summaryrefslogtreecommitdiff
path: root/libc/stdlib/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/random.c')
-rw-r--r--libc/stdlib/random.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libc/stdlib/random.c b/libc/stdlib/random.c
index b0a00e15c..833877039 100644
--- a/libc/stdlib/random.c
+++ b/libc/stdlib/random.c
@@ -22,6 +22,9 @@
* Rewritten to use reentrant functions by Ulrich Drepper, 1995.
*/
+#define random_r __random_r
+#define srandom_r __srandom_r
+
#define _GNU_SOURCE
#include <features.h>
#include <limits.h>
@@ -243,7 +246,7 @@ char * setstate (char *arg_state)
rear pointers can't wrap on the same call by not testing the rear
pointer if the front one has wrapped. Returns a 31-bit random number. */
-long int random ()
+long int attribute_hidden __random ()
{
int32_t retval;
@@ -252,4 +255,4 @@ long int random ()
__pthread_mutex_unlock(&lock);
return retval;
}
-
+strong_alias(__random,random)