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

Martin Storsjö git at videolan.org
Thu Apr 9 11:46:35 CEST 2020


vlc/vlc-3.0 | branch: master | Martin Storsjö <martin at martin.st> | Thu Dec 14 23:06:32 2017 +0200| [b17890b054f50395bf5cdd9bfa535ee752448f4e] | 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.

(cherry picked from commit 22fed9624f2ce7e3db5b5516a819c147ac1d13d4)

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

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

diff --git a/configure.ac b/configure.ac
index 0949ea4442..1836f41b7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -683,10 +683,11 @@ LIBS="${LIBS} ${SOCKET_LIBS}"
 CFLAGS="${CFLAGS} -Werror-implicit-function-declaration"
 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