diff options
-rw-r--r-- | include/stdlib.h | 4 | ||||
-rw-r--r-- | libc/stdlib/arc4random.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/stdlib.h b/include/stdlib.h index e9a8b84c2..7b35840d8 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -902,8 +902,8 @@ extern int getloadavg (double __loadavg[], int __nelem) #endif #ifdef __UCLIBC_HAS_ARC4RANDOM__ -#include <stdint.h> -extern uint32_t arc4random(void); +# include <sys/types.h> +extern u_int32_t arc4random(void); extern void arc4random_stir(void); extern void arc4random_addrandom(unsigned char *, int); #endif diff --git a/libc/stdlib/arc4random.c b/libc/stdlib/arc4random.c index c7aed66b6..7b9b12d6f 100644 --- a/libc/stdlib/arc4random.c +++ b/libc/stdlib/arc4random.c @@ -30,6 +30,7 @@ #include <fcntl.h> #include <stdlib.h> #include <unistd.h> +#include <stdint.h> #include <sys/types.h> #include <sys/param.h> #include <sys/time.h> @@ -175,7 +176,7 @@ arc4random_addrandom(u_char *dat, int datlen) arc4_addrandom(&rs, dat, datlen); } -uint32_t +u_int32_t arc4random(void) { if (!rs_initialized) |