From 0a65bf3ddd70d83ed0ee6d003a46e8c32e580907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 26 Feb 2018 13:17:58 +0200 Subject: [PATCH] Include windows.h before checking the _WIN32_WINNT version The default value of _WIN32_WINNT isn't something that is built into the compiler, but is defined by the toolchain headers. Include windows.h after including ws2tcpip.h/winsock2.h, since those headers should be included in that particular order. --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index ecd4ba7..6a9f69c 100644 --- a/configure.ac +++ b/configure.ac @@ -220,10 +220,11 @@ LIBS_SAVE=${LIBS} LIBS="${LIBS} ${LIBSOCKET}" AC_LINK_IFELSE([ AC_LANG_PROGRAM([#ifdef _WIN32 + #include + #include # if _WIN32_WINNT < 0x600 # error Needs vista+ # endif - #include #else #include #include @@ -233,10 +234,11 @@ AC_LINK_IFELSE([ AC_LINK_IFELSE([ AC_LANG_PROGRAM([#include #ifdef _WIN32 + #include + #include # if _WIN32_WINNT < 0x600 # error Needs vista+ # endif - #include #else #include #endif], [