diff options
Diffstat (limited to 'libc')
-rw-r--r-- | libc/stdlib/arc4random.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libc/stdlib/arc4random.c b/libc/stdlib/arc4random.c index ebdd7d561..789bb1713 100644 --- a/libc/stdlib/arc4random.c +++ b/libc/stdlib/arc4random.c @@ -37,8 +37,14 @@ #include <sys/time.h> #ifdef __ARC4RANDOM_USE_ERANDOM__ #include <sys/sysctl.h> +//libc_hidden_proto(sysctl) #endif +libc_hidden_proto(open) +libc_hidden_proto(read) +libc_hidden_proto(close) +libc_hidden_proto(gettimeofday) + struct arc4_stream { u_int8_t i; u_int8_t j; @@ -98,10 +104,10 @@ arc4_stir(as) int n; gettimeofday(&rdat.tv, NULL); - fd = __open("/dev/urandom", O_RDONLY); + fd = open("/dev/urandom", O_RDONLY); if (fd != -1) { - __read(fd, rdat.rnd, sizeof(rdat.rnd)); - __close(fd); + read(fd, rdat.rnd, sizeof(rdat.rnd)); + close(fd); } #ifdef __ARC4RANDOM_USE_ERANDOM__ else { |