diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-06 03:33:06 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-06 03:33:06 +0000 |
commit | bd7bace793536f027790396d6358c14299e8595b (patch) | |
tree | dcc993baefecea2b27019336c4502e61d49b98c5 /libc/stdlib/random.c | |
parent | 7608c85140162446c3830421eb94ae42a1bbb893 (diff) | |
download | uClibc-alpine-bd7bace793536f027790396d6358c14299e8595b.tar.bz2 uClibc-alpine-bd7bace793536f027790396d6358c14299e8595b.tar.xz |
Big merge from trunk. Stop the madness!
Diffstat (limited to 'libc/stdlib/random.c')
-rw-r--r-- | libc/stdlib/random.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libc/stdlib/random.c b/libc/stdlib/random.c index 3ffa50690..d40420740 100644 --- a/libc/stdlib/random.c +++ b/libc/stdlib/random.c @@ -24,21 +24,20 @@ #define random_r __random_r #define srandom_r __srandom_r +#define setstate_r __setstate_r #define _GNU_SOURCE #include <features.h> #include <limits.h> #include <stddef.h> #include <stdlib.h> + #ifdef __UCLIBC_HAS_THREADS__ -#include <pthread.h> +# include <pthread.h> /* POSIX.1c requires that there is mutual exclusion for the `rand' and `srand' functions to prevent concurrent calls from modifying common data. */ static pthread_mutex_t lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; -#else -#define __pthread_mutex_lock(x) -#define __pthread_mutex_unlock(x) #endif /* An improved random number generation package. In addition to the standard |