diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-04-23 16:32:42 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-04-23 16:32:42 +0000 |
commit | ef236ec3b26300c0a18872c432122a74f9d5459e (patch) | |
tree | eeaaa927765ca06f61c1b559b3fff5263a6b5654 /crypto/rand/rand_os2.c | |
parent | 8711efb4984b66a901b543d1b5d96fc5b6928d10 (diff) |
Merge from 1.0.0-stable branch.
Diffstat (limited to 'crypto/rand/rand_os2.c')
-rw-r--r-- | crypto/rand/rand_os2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/rand/rand_os2.c b/crypto/rand/rand_os2.c index c3e36d4e5e..fc1e78b179 100644 --- a/crypto/rand/rand_os2.c +++ b/crypto/rand/rand_os2.c @@ -78,8 +78,10 @@ typedef struct _CPUUTIL { ULONG ulIntrHigh; /* High 32 bits of interrupt time */ } CPUUTIL; +#ifndef __KLIBC__ APIRET APIENTRY(*DosPerfSysCall) (ULONG ulCommand, ULONG ulParm1, ULONG ulParm2, ULONG ulParm3) = NULL; APIRET APIENTRY(*DosQuerySysState) (ULONG func, ULONG arg1, ULONG pid, ULONG _res_, PVOID buf, ULONG bufsz) = NULL; +#endif HMODULE hDoscalls = 0; int RAND_poll(void) @@ -91,6 +93,7 @@ int RAND_poll(void) if (hDoscalls == 0) { ULONG rc = DosLoadModule(failed_module, sizeof(failed_module), "DOSCALLS", &hDoscalls); +#ifndef __KLIBC__ if (rc == 0) { rc = DosQueryProcAddr(hDoscalls, 976, NULL, (PFN *)&DosPerfSysCall); @@ -102,6 +105,7 @@ int RAND_poll(void) if (rc) DosQuerySysState = NULL; } +#endif } /* Sample the hi-res timer, runs at around 1.1 MHz */ @@ -122,7 +126,9 @@ int RAND_poll(void) RAND_add(&util, sizeof(util), 10); } else { +#ifndef __KLIBC__ DosPerfSysCall = NULL; +#endif } } |