From: Richard Levitte Date: Sat, 16 Dec 2000 11:19:19 +0000 (+0000) Subject: Do not poll DEVRANDOM if weäre building without an file pointer API. X-Git-Tag: OpenSSL_0_9_6a-beta1~81^2~127 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=3a3ca1d474fb6f268f89e9411575f785c06041c5;hp=7522254b482009306f1cb9a8a5522cc728cf2857 Do not poll DEVRANDOM if weäre building without an file pointer API. Spotted by "David Schwartz" . --- 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; }