From 346b1001eb239a122e955ece3a44ad38c4a78898 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 22 Apr 2009 16:21:20 +0000 Subject: PR: 1903 Submitted by: "Paul Smedley" Approved by: steve@openssl.org OS/2 fixes (excludes Makefile.shared patch for now). --- Configure | 2 +- crypto/rand/rand_os2.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Configure b/Configure index 8f9f2ded4a..e651475019 100755 --- a/Configure +++ b/Configure @@ -573,7 +573,7 @@ my %table=( my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A VC-NT VC-CE VC-WIN32 - BC-32 OS2-EMX + BC-32 netware-clib netware-clib-bsdsock netware-libc netware-libc-bsdsock); 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 } } -- cgit v1.2.3