From 3a3ca1d474fb6f268f89e9411575f785c06041c5 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sat, 16 Dec 2000 11:19:19 +0000 Subject: [PATCH] =?utf8?q?Do=20not=20poll=20DEVRANDOM=20if=20we=C3=A4re=20?= =?utf8?q?building=20without=20an=20file=20pointer=20API.=20Spotted=20by?= =?utf8?q?=20"David=20Schwartz"=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- crypto/rand/rand_win.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c index f0655803f0..e8e12e21c7 100644 --- a/crypto/rand/rand_win.c +++ b/crypto/rand/rand_win.c @@ -692,10 +692,13 @@ int RAND_poll(void) { unsigned long l; pid_t curr_pid = getpid(); +#ifndef NO_FP_API #ifdef DEVRANDOM FILE *fh; #endif +#endif +#ifndef NO_FP_API #ifdef DEVRANDOM /* Use a random entropy pool device. Linux, FreeBSD and OpenBSD * have this. Use /dev/urandom if you can as /dev/random may block @@ -712,6 +715,7 @@ int RAND_poll(void) RAND_add(tmpbuf,sizeof tmpbuf,n); memset(tmpbuf,0,n); } +#endif #endif /* put in some default random data, we need more than just this */ @@ -723,8 +727,10 @@ int RAND_poll(void) l=time(NULL); RAND_add(&l,sizeof(l),0); +#ifndef NO_FP_API #ifdef DEVRANDOM return 1; +#endif #endif return 0; } -- 2.25.1