Patches from Vern Staats <staatsvr@asc.hpc.mil> to get Kerberos 5 in
[oweals/openssl.git] / crypto / rand / rand_win.c
index 56558c4f154a865b487610200c2ad120899b4947..5f71d2da2600eee32f5440bf3c6cfa3473f489ea 100644 (file)
 #include <openssl/rand.h>
 #include "rand_lcl.h"
 
-#if defined(WINDOWS) || defined(WIN32)
+#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
 #include <windows.h>
 #ifndef _WIN32_WINNT
 # define _WIN32_WINNT 0x0400
@@ -582,7 +582,8 @@ static void readtimer(void)
        if (have_tsc) {
          __try {
            __asm {
-             rdtsc
+             _emit 0x0f
+             _emit 0x31
              mov cyclecount, eax
              }
            RAND_add(&cyclecount, sizeof(cyclecount), 1);