build with clang
This commit is contained in:
parent
274304eb69
commit
6bc7c67a23
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.23 2017/04/10 11:46:23 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.24 2017/05/19 13:19:59 espie Exp $
|
||||
|
||||
COMMENT = UPnP media server
|
||||
|
||||
VER = 0.12.1
|
||||
DISTNAME = mediatomb-${VER}
|
||||
REVISION = 14
|
||||
REVISION = 15
|
||||
|
||||
CATEGORIES = multimedia
|
||||
|
||||
|
42
multimedia/mediatomb/patches/patch-src_hash_dbo_hash_h
Normal file
42
multimedia/mediatomb/patches/patch-src_hash_dbo_hash_h
Normal file
@ -0,0 +1,42 @@
|
||||
$OpenBSD: patch-src_hash_dbo_hash_h,v 1.1 2017/05/19 13:19:59 espie Exp $
|
||||
two phase name lookup
|
||||
|
||||
Index: src/hash/dbo_hash.h
|
||||
--- src/hash/dbo_hash.h.orig
|
||||
+++ src/hash/dbo_hash.h
|
||||
@@ -106,7 +106,7 @@ class DBOHash : public DHashBase<KT, struct dbo_hash_s
|
||||
inline bool remove(KT key)
|
||||
{
|
||||
struct dbo_hash_slot<KT, VT> *slot;
|
||||
- if (! search(key, &slot))
|
||||
+ if (! this->search(key, &slot))
|
||||
return false;
|
||||
slot->key = deletedKey;
|
||||
slot->value->release();
|
||||
@@ -136,7 +136,7 @@ class DBOHash : public DHashBase<KT, struct dbo_hash_s
|
||||
inline void put(KT key, zmm::Ref<VT> value)
|
||||
{
|
||||
struct dbo_hash_slot<KT, VT> *slot;
|
||||
- search(key, &slot);
|
||||
+ this->search(key, &slot);
|
||||
put(key, (hash_slot_t)slot, value);
|
||||
}
|
||||
void put(KT key, hash_slot_t destSlot, zmm::Ref<VT> value)
|
||||
@@ -162,7 +162,7 @@ class DBOHash : public DHashBase<KT, struct dbo_hash_s
|
||||
inline zmm::Ref<VT> get(KT key)
|
||||
{
|
||||
struct dbo_hash_slot<KT, VT> *slot;
|
||||
- bool found = search(key, &slot);
|
||||
+ bool found = this->search(key, &slot);
|
||||
if (found)
|
||||
return zmm::Ref<VT>(slot->value);
|
||||
else
|
||||
@@ -174,7 +174,7 @@ class DBOHash : public DHashBase<KT, struct dbo_hash_s
|
||||
inline zmm::Ref<VT> get(KT key, hash_slot_t *destSlot)
|
||||
{
|
||||
struct dbo_hash_slot<KT, VT> **slot = (struct dbo_hash_slot<KT, VT> **)destSlot;
|
||||
- bool found = search(key, slot);
|
||||
+ bool found = this->search(key, slot);
|
||||
if (found)
|
||||
return zmm::Ref<VT>((*slot)->value);
|
||||
else
|
33
multimedia/mediatomb/patches/patch-src_hash_dbr_hash_h
Normal file
33
multimedia/mediatomb/patches/patch-src_hash_dbr_hash_h
Normal file
@ -0,0 +1,33 @@
|
||||
$OpenBSD: patch-src_hash_dbr_hash_h,v 1.1 2017/05/19 13:19:59 espie Exp $
|
||||
two phase name lookup
|
||||
|
||||
Index: src/hash/dbr_hash.h
|
||||
--- src/hash/dbr_hash.h.orig
|
||||
+++ src/hash/dbr_hash.h
|
||||
@@ -124,7 +124,7 @@ class DBRHash : public DHashBase<KT, struct dbr_hash_s
|
||||
inline bool remove(KT key)
|
||||
{
|
||||
struct dbr_hash_slot<KT> *slot;
|
||||
- if (! search(key, &slot))
|
||||
+ if (! this->search(key, &slot))
|
||||
return false;
|
||||
slot->key = deletedKey;
|
||||
int array_slot = slot->array_slot;
|
||||
@@ -134,7 +134,7 @@ class DBRHash : public DHashBase<KT, struct dbr_hash_s
|
||||
return true;
|
||||
}
|
||||
data_array[array_slot] = data_array[--this->count];
|
||||
- if (! search(data_array[array_slot], &slot))
|
||||
+ if (! this->search(data_array[array_slot], &slot))
|
||||
{
|
||||
log_debug("DBR-Hash-Error: (%d; array_slot=%d; count=%d)\n", data_array[array_slot], array_slot, this->count);
|
||||
throw zmm::Exception(_("DBR-Hash-Error: key in data_array not found in hashtable"));
|
||||
@@ -146,7 +146,7 @@ class DBRHash : public DHashBase<KT, struct dbr_hash_s
|
||||
inline void put(KT key)
|
||||
{
|
||||
struct dbr_hash_slot<KT> *slot;
|
||||
- if (! search(key, &slot))
|
||||
+ if (! this->search(key, &slot))
|
||||
{
|
||||
#ifdef TOMBDEBUG
|
||||
if (this->count >= realCapacity)
|
42
multimedia/mediatomb/patches/patch-src_hash_dso_hash_h
Normal file
42
multimedia/mediatomb/patches/patch-src_hash_dso_hash_h
Normal file
@ -0,0 +1,42 @@
|
||||
$OpenBSD: patch-src_hash_dso_hash_h,v 1.1 2017/05/19 13:19:59 espie Exp $
|
||||
two phase name lookup
|
||||
|
||||
Index: src/hash/dso_hash.h
|
||||
--- src/hash/dso_hash.h.orig
|
||||
+++ src/hash/dso_hash.h
|
||||
@@ -100,7 +100,7 @@ class DSOHash : public DHashBase<zmm::String, struct d
|
||||
inline bool remove(zmm::String key)
|
||||
{
|
||||
struct dso_hash_slot<VT> *slot;
|
||||
- if (! search(key, &slot))
|
||||
+ if (! this->search(key, &slot))
|
||||
return false;
|
||||
slot->key->release();
|
||||
slot->value->release();
|
||||
@@ -112,7 +112,7 @@ class DSOHash : public DHashBase<zmm::String, struct d
|
||||
inline void put(zmm::String key, zmm::Ref<VT> value)
|
||||
{
|
||||
struct dso_hash_slot<VT> *slot;
|
||||
- search(key, &slot);
|
||||
+ this->search(key, &slot);
|
||||
put(key, (hash_slot_t)slot, value);
|
||||
}
|
||||
void put(zmm::String key, hash_slot_t destSlot, zmm::Ref<VT> value)
|
||||
@@ -141,7 +141,7 @@ class DSOHash : public DHashBase<zmm::String, struct d
|
||||
inline zmm::Ref<VT> get(zmm::String key)
|
||||
{
|
||||
struct dso_hash_slot<VT> *slot;
|
||||
- bool found = search(key, &slot);
|
||||
+ bool found = this->search(key, &slot);
|
||||
if (found)
|
||||
return zmm::Ref<VT>(slot->value);
|
||||
else
|
||||
@@ -153,7 +153,7 @@ class DSOHash : public DHashBase<zmm::String, struct d
|
||||
inline zmm::Ref<VT> get(zmm::String key, hash_slot_t *destSlot)
|
||||
{
|
||||
struct dso_hash_slot<VT> **slot = (struct dso_hash_slot<VT> **)destSlot;
|
||||
- bool found = search(key, slot);
|
||||
+ bool found = this->search(key, slot);
|
||||
if (found)
|
||||
return zmm::Ref<VT>((*slot)->value);
|
||||
else
|
23
multimedia/mediatomb/patches/patch-src_singleton_h
Normal file
23
multimedia/mediatomb/patches/patch-src_singleton_h
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-src_singleton_h,v 1.1 2017/05/19 13:19:59 espie Exp $
|
||||
pre-declare, not enough to shup up all warnings
|
||||
|
||||
Index: src/singleton.h
|
||||
--- src/singleton.h.orig
|
||||
+++ src/singleton.h
|
||||
@@ -58,6 +58,8 @@ class SingletonManager : public zmm::Object (protected
|
||||
template <class T>
|
||||
class Singleton : public zmm::Object
|
||||
{
|
||||
+protected:
|
||||
+ static zmm::Ref<Mutex> mutex;
|
||||
public:
|
||||
static zmm::Ref<T> getInstance()
|
||||
{
|
||||
@@ -87,7 +89,6 @@ class Singleton : public zmm::Object (protected)
|
||||
virtual void init() { }
|
||||
virtual void shutdown() { }
|
||||
|
||||
- static zmm::Ref<Mutex> mutex;
|
||||
static zmm::Ref<T> instance;
|
||||
static bool singletonActive;
|
||||
|
@ -0,0 +1,15 @@
|
||||
$OpenBSD: patch-tombupnp_upnp_src_genlib_net_http_webserver_c,v 1.1 2017/05/19 13:19:59 espie Exp $
|
||||
gnu89 inlines
|
||||
|
||||
Index: tombupnp/upnp/src/genlib/net/http/webserver.c
|
||||
--- tombupnp/upnp/src/genlib/net/http/webserver.c.orig
|
||||
+++ tombupnp/upnp/src/genlib/net/http/webserver.c
|
||||
@@ -310,7 +310,7 @@ search_extension( IN const char *extension,
|
||||
* 0 - On Sucess
|
||||
* UPNP_E_OUTOF_MEMORY - on memory allocation failures
|
||||
************************************************************************/
|
||||
-XINLINE int
|
||||
+int
|
||||
get_content_type( IN const char *filename,
|
||||
OUT DOMString * content_type )
|
||||
{
|
@ -0,0 +1,15 @@
|
||||
$OpenBSD: patch-tombupnp_upnp_src_uuid_upnp_md5_c,v 1.1 2017/05/19 13:19:59 espie Exp $
|
||||
XXX real size bug!
|
||||
|
||||
Index: tombupnp/upnp/src/uuid/upnp_md5.c
|
||||
--- tombupnp/upnp/src/uuid/upnp_md5.c.orig
|
||||
+++ tombupnp/upnp/src/uuid/upnp_md5.c
|
||||
@@ -137,7 +137,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx)
|
||||
|
||||
byteSwap(ctx->buf, 4);
|
||||
memcpy(digest, ctx->buf, 16);
|
||||
- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
|
||||
+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
|
||||
}
|
||||
|
||||
#ifndef ASM_MD5
|
Loading…
x
Reference in New Issue
Block a user