diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 51a7bb5fd..cd103f7e9 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2010-12-29 Christopher Faylor + + * cygtls.cc: Include stdlib.h. + (_cygtls::init_thread): Seed random number generator on a per-thread + basis. + 2010-12-27 Christopher Faylor * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 234. diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc index c59f0cbd0..730c14182 100644 --- a/winsup/cygwin/cygtls.cc +++ b/winsup/cygwin/cygtls.cc @@ -10,6 +10,7 @@ details. */ #define USE_SYS_TYPES_FD_SET #include "cygtls.h" #include +#include #include "path.h" #include "fhandler.h" #include "dtable.h" @@ -93,6 +94,7 @@ _cygtls::init_thread (void *x, DWORD (*func) (void *, void *)) } local_clib._current_locale = "C"; locals.process_logmask = LOG_UPTO (LOG_DEBUG); + srand48 ((long int) &x); } thread_id = GetCurrentThreadId ();