diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-01-03 22:53:06 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-01-03 22:53:06 +0000 |
commit | 3b0e61a812cef6bd45ace87b92e152f97a98bece (patch) | |
tree | 239f1b132f8ab7e7f77e12ba3ee2ab04c4691f26 /crypto/rand | |
parent | e84b0d709b1b0b02f175b6da827256c3d8497ff7 (diff) |
Netware support.
Submitted by: Guenter Knauf <eflash@gmx.net>
Diffstat (limited to 'crypto/rand')
-rw-r--r-- | crypto/rand/rand_nw.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crypto/rand/rand_nw.c b/crypto/rand/rand_nw.c index ba57812788..f177ffbe82 100644 --- a/crypto/rand/rand_nw.c +++ b/crypto/rand/rand_nw.c @@ -117,9 +117,15 @@ #if defined(NETWARE_LIBC) #include <nks/thread.h> +#else +#include <nwthread.h> #endif -extern long RunningProcess; +extern int GetProcessSwitchCount(void); +#if !defined(NETWARE_LIBC) || (CURRENT_NDK_THRESHOLD < 509220000) +extern void *RunningProcess; /* declare here same as found in newer NDKs */ +extern unsigned long GetSuperHighResolutionTimer(void); +#endif /* the FAQ indicates we need to provide at least 20 bytes (160 bits) of seed */ @@ -142,7 +148,8 @@ int RAND_poll(void) l = GetProcessSwitchCount(); RAND_add(&l,sizeof(l),1); - l=RunningProcess; + /* need to cast the void* to unsigned long here */ + l = (unsigned long)RunningProcess; RAND_add(&l,sizeof(l),1); for( i=2; i<ENTROPY_NEEDED; i++) |