[vlc-commits] configure: Include windows.h before checking the _WIN32_WINNT version

Martin Storsjö git at videolan.org
Mon Feb 26 11:51:15 CET 2018


vlc | branch: master | Martin Storsjö <martin at martin.st> | Thu Dec 14 23:06:32 2017 +0200| [22fed9624f2ce7e3db5b5516a819c147ac1d13d4] | committer: Martin Storsjö

configure: 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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=22fed9624f2ce7e3db5b5516a819c147ac1d13d4
---

 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 62af699452..4184012912 100644
--- a/configure.ac
+++ b/configure.ac
@@ -665,10 +665,11 @@ AC_SEARCH_LIBS([inet_pton], [nsl], [
 LIBS="${LIBS} ${SOCKET_LIBS}"
 AC_LINK_IFELSE([
     AC_LANG_PROGRAM([#ifdef _WIN32
+        #include <ws2tcpip.h>
+        #include <windows.h>
         # if _WIN32_WINNT < 0x600
         #  error Needs vista+
         # endif
-        #include <ws2tcpip.h>
         #else
         #include <sys/socket.h>
         #include <arpa/inet.h>



More information about the vlc-commits mailing list