pkgsrc/net/libupnp/patches/patch-af

17 lines
714 B
Text

$NetBSD: patch-af,v 1.1.1.1 2006/06/03 23:29:24 rh Exp $
--- threadutil/src/ThreadPool.c.orig 2006-02-28 07:48:27.000000000 +1000
+++ threadutil/src/ThreadPool.c
@@ -339,9 +339,11 @@ tp->stats.totalJobsLQ++; tp->stats.total
*****************************************************************************/
static void SetSeed( ) {
struct timeb t;
+ volatile union { volatile pthread_t tid; volatile unsigned i; } idu;
ftime( &t );
- srand( ( unsigned int )t.millitm + ithread_get_current_thread_id( ) );
+ idu.tid = ithread_get_current_thread_id();
+ srand( ( unsigned int )t.millitm + idu.i );
}
/****************************************************************************