fixes build on DragonFly BSD.

This commit is contained in:
obache 2011-04-24 13:51:52 +00:00
parent 0483e5a79d
commit f8a3caa4d5
2 changed files with 17 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.8 2011/04/14 07:26:34 adam Exp $
$NetBSD: distinfo,v 1.9 2011/04/24 13:51:52 obache Exp $
SHA1 (mediatomb-0.12.1.tar.gz) = 86e880584cc9c8aaf3926d56048510d1d06e76b4
RMD160 (mediatomb-0.12.1.tar.gz) = ecb61ca2483f76421beef1036ac442b8f805fa96
@ -11,4 +11,5 @@ SHA1 (patch-bc) = 40ef84ec5802431c5f2a811a5bf53a76d15c3904
SHA1 (patch-src_hash_dbo_hash.h) = 77ecff9c2cc5ef940c3bc1e3e8b5c0aad7b7f690
SHA1 (patch-src_hash_dbr_hash.h) = a57f155ffe43ff8615706b76718a835590999375
SHA1 (patch-src_hash_dso_hash.h) = 50e0ce32e58e9d2122bed4db3509fa1f53c12945
SHA1 (patch-tombupnp_threadutil_src_ThreadPool.c) = 152fd5284382bfbdfe489945dd1e843fa38d5b02
SHA1 (patch-tombupnp_upnp_src_genlib_net_http_webserver.c) = 671753a05d221370981e9ee6fdc1d896cadf2836

View file

@ -0,0 +1,15 @@
$NetBSD: patch-tombupnp_threadutil_src_ThreadPool.c,v 1.1 2011/04/24 13:51:52 obache Exp $
* treat DragonFly same as other *BSD.
--- tombupnp/threadutil/src/ThreadPool.c.orig 2010-03-25 14:58:13.000000000 +0000
+++ tombupnp/threadutil/src/ThreadPool.c
@@ -372,7 +372,7 @@ tp->stats.totalJobsLQ++; tp->stats.total
gettimeofday( &t, NULL );
#if defined(WIN32)
srand( ( unsigned int )(t.tv_usec/1000) + (unsigned int)ithread_get_current_thread_id( ).p );
-#elif defined(__FreeBSD__) || defined (__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__)
+#elif defined(__FreeBSD__) || defined (__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
srand( ( unsigned int )(t.tv_usec/1000) + (unsigned int)ithread_get_current_thread_id( ) );
#else
srand( ( unsigned int )(t.tv_usec/1000) + ithread_get_current_thread_id( ) );