From d810a51e01f28359d6ce85f44ab72c91f2dc30db Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 14 Jan 2006 03:17:45 +0000 Subject: adapt to new hidden --- libc/stdlib/arc4random.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libc/stdlib') 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 #ifdef __ARC4RANDOM_USE_ERANDOM__ #include +//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 { -- cgit v1.2.3