openbsd-ports/multimedia/mediatomb/patches/patch-tombupnp_threadutil_src_ThreadPool_c
2010-11-09 13:26:31 +00:00

16 lines
881 B
Plaintext

$OpenBSD: patch-tombupnp_threadutil_src_ThreadPool_c,v 1.2 2010/11/09 13:26:31 jasper Exp $
--- tombupnp/threadutil/src/ThreadPool.c.orig Thu Mar 25 10:58:13 2010
+++ tombupnp/threadutil/src/ThreadPool.c Sun Nov 7 12:25:04 2010
@@ -372,8 +372,10 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff
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(__NetBSD__)
srand( ( unsigned int )(t.tv_usec/1000) + (unsigned int)ithread_get_current_thread_id( ) );
+#elif defined(__OpenBSD__)
+ srand( arc4random() );
#else
srand( ( unsigned int )(t.tv_usec/1000) + ithread_get_current_thread_id( ) );
#endif