Fix build with VS2008
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 9 Sep 2019 09:42:56 +0000 (11:42 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 9 Sep 2019 14:43:52 +0000 (16:43 +0200)
crypto/rand/rand_win.c(70) : error C2065: 'BCRYPT_USE_SYSTEM_PREFERRED_RNG' : undeclared identifier

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9827)

crypto/rand/rand_win.c

index 8b87419698de71c3487fc84d9fba808307b8a694..38852dc7a080c4809aafc016f78ec96cdcf25a0f 100644 (file)
@@ -19,7 +19,8 @@
 
 # include <windows.h>
 /* On Windows Vista or higher use BCrypt instead of the legacy CryptoAPI */
-# if defined(_MSC_VER) && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0600
+# if defined(_MSC_VER) && _MSC_VER > 1500 /* 1500 = Visual Studio 2008 */ \
+     && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0600
 #  define USE_BCRYPTGENRANDOM
 # endif