summaryrefslogtreecommitdiffstats
path: root/crypto/rand/rand_nw.c
diff options
context:
space:
mode:
authorsimon <simon@FreeBSD.org>2008-09-21 14:56:30 +0000
committersimon <simon@FreeBSD.org>2008-09-21 14:56:30 +0000
commit859b6dcfcc8295a0eac4afbc70e4d42aa512674a (patch)
treea136b5b2317abe8eb83b021afe5e088230fd67e2 /crypto/rand/rand_nw.c
parentfe745806aa8bec66ca79fe8f032ad472261ba789 (diff)
downloadFreeBSD-src-859b6dcfcc8295a0eac4afbc70e4d42aa512674a.zip
FreeBSD-src-859b6dcfcc8295a0eac4afbc70e4d42aa512674a.tar.gz
Vendor import of OpenSSL 0.9.8i.
Diffstat (limited to 'crypto/rand/rand_nw.c')
-rw-r--r--crypto/rand/rand_nw.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/crypto/rand/rand_nw.c b/crypto/rand/rand_nw.c
index ba57812..f177ffb 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++)
OpenPOWER on IntegriCloud