diff options
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 |