aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-01-17 22:36:21 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-01-18 11:42:48 +0000
commite35ffda0b3133def6f40d498ffa2faf60fb72899 (patch)
tree8f74d5233886f65d8a76c2b60e0b50608048e6fa
parentd2671340a613da407613b4f157a5552b291b7c26 (diff)
win32: Added additional preprocessor check for Version Helper API
A follow up patch to commit d2671340a613 as _WIN32_WINNT_WIN2K and _WIN32_WINNT_WIN2K may not be defined on all systems.
-rw-r--r--lib/connect.c3
-rw-r--r--lib/curl_sspi.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 0f7deb3cb..5a376c34a 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -921,7 +921,8 @@ void Curl_sndbufset(curl_socket_t sockfd)
static int detectOsState = DETECT_OS_NONE;
if(detectOsState == DETECT_OS_NONE) {
-#if (_WIN32_WINNT < _WIN32_WINNT_WIN2K)
+#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_WIN2K) || \
+ (_WIN32_WINNT < _WIN32_WINNT_WIN2K)
OSVERSIONINFO osver;
memset(&osver, 0, sizeof(osver));
diff --git a/lib/curl_sspi.c b/lib/curl_sspi.c
index 1cc18877f..bb41a879c 100644
--- a/lib/curl_sspi.c
+++ b/lib/curl_sspi.c
@@ -79,7 +79,8 @@ CURLcode Curl_sspi_global_init(void)
DWORD majorVersion = 4;
DWORD platformId = VER_PLATFORM_WIN32_NT;
-#if (_WIN32_WINNT < _WIN32_WINNT_WIN2K)
+#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_WIN2K) || \
+ (_WIN32_WINNT < _WIN32_WINNT_WIN2K)
OSVERSIONINFO osver;
memset(&osver, 0, sizeof(osver));