diff options
author | Richard Levitte <levitte@openssl.org> | 2000-12-16 11:19:19 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-12-16 11:19:19 +0000 |
commit | 3a3ca1d474fb6f268f89e9411575f785c06041c5 (patch) | |
tree | b298deb4c74b1fce38f52f41af8cbdf4b042d843 /crypto/rand/rand_win.c | |
parent | 7522254b482009306f1cb9a8a5522cc728cf2857 (diff) |
Do not poll DEVRANDOM if weƤre building without an file pointer API.
Spotted by "David Schwartz" <davids@webmaster.com>.
Diffstat (limited to 'crypto/rand/rand_win.c')
-rw-r--r-- | crypto/rand/rand_win.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ -713,6 +716,7 @@ int RAND_poll(void) memset(tmpbuf,0,n); } #endif +#endif /* put in some default random data, we need more than just this */ l=curr_pid; @@ -723,9 +727,11 @@ 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; } |