summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rand/rand_os2.c
diff options
context:
space:
mode:
authordjm <>2010-10-01 22:59:01 +0000
committerdjm <>2010-10-01 22:59:01 +0000
commitfe047d8b632246cb2db3234a0a4f32e5c318857b (patch)
tree939b752540947d33507b3acc48d76a8bfb7c3dc3 /src/lib/libcrypto/rand/rand_os2.c
parent2ea67f4aa254b09ded62e6e14fc893bbe6381579 (diff)
downloadopenbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.gz
openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.bz2
openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.zip
resolve conflicts, fix local changes
Diffstat (limited to 'src/lib/libcrypto/rand/rand_os2.c')
-rw-r--r--src/lib/libcrypto/rand/rand_os2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/libcrypto/rand/rand_os2.c b/src/lib/libcrypto/rand/rand_os2.c
index c3e36d4e5e..fc1e78b179 100644
--- a/src/lib/libcrypto/rand/rand_os2.c
+++ b/src/lib/libcrypto/rand/rand_os2.c
@@ -78,8 +78,10 @@ typedef struct _CPUUTIL {
78 ULONG ulIntrHigh; /* High 32 bits of interrupt time */ 78 ULONG ulIntrHigh; /* High 32 bits of interrupt time */
79} CPUUTIL; 79} CPUUTIL;
80 80
81#ifndef __KLIBC__
81APIRET APIENTRY(*DosPerfSysCall) (ULONG ulCommand, ULONG ulParm1, ULONG ulParm2, ULONG ulParm3) = NULL; 82APIRET APIENTRY(*DosPerfSysCall) (ULONG ulCommand, ULONG ulParm1, ULONG ulParm2, ULONG ulParm3) = NULL;
82APIRET APIENTRY(*DosQuerySysState) (ULONG func, ULONG arg1, ULONG pid, ULONG _res_, PVOID buf, ULONG bufsz) = NULL; 83APIRET APIENTRY(*DosQuerySysState) (ULONG func, ULONG arg1, ULONG pid, ULONG _res_, PVOID buf, ULONG bufsz) = NULL;
84#endif
83HMODULE hDoscalls = 0; 85HMODULE hDoscalls = 0;
84 86
85int RAND_poll(void) 87int RAND_poll(void)
@@ -91,6 +93,7 @@ int RAND_poll(void)
91 if (hDoscalls == 0) { 93 if (hDoscalls == 0) {
92 ULONG rc = DosLoadModule(failed_module, sizeof(failed_module), "DOSCALLS", &hDoscalls); 94 ULONG rc = DosLoadModule(failed_module, sizeof(failed_module), "DOSCALLS", &hDoscalls);
93 95
96#ifndef __KLIBC__
94 if (rc == 0) { 97 if (rc == 0) {
95 rc = DosQueryProcAddr(hDoscalls, 976, NULL, (PFN *)&DosPerfSysCall); 98 rc = DosQueryProcAddr(hDoscalls, 976, NULL, (PFN *)&DosPerfSysCall);
96 99
@@ -102,6 +105,7 @@ int RAND_poll(void)
102 if (rc) 105 if (rc)
103 DosQuerySysState = NULL; 106 DosQuerySysState = NULL;
104 } 107 }
108#endif
105 } 109 }
106 110
107 /* Sample the hi-res timer, runs at around 1.1 MHz */ 111 /* Sample the hi-res timer, runs at around 1.1 MHz */
@@ -122,7 +126,9 @@ int RAND_poll(void)
122 RAND_add(&util, sizeof(util), 10); 126 RAND_add(&util, sizeof(util), 10);
123 } 127 }
124 else { 128 else {
129#ifndef __KLIBC__
125 DosPerfSysCall = NULL; 130 DosPerfSysCall = NULL;
131#endif
126 } 132 }
127 } 133 }
128 134