]> The Tcpdump Group git mirrors - libpcap/commitdiff
CMake: force _WIN32_WINNT to be Windows 7 when building for MinGW.
authorGuy Harris <[email protected]>
Sat, 26 Jun 2021 02:06:58 +0000 (19:06 -0700)
committerGuy Harris <[email protected]>
Sat, 26 Jun 2021 02:27:05 +0000 (19:27 -0700)
That will make ntddndis.h define NdisMediumIP, which we will need.

(cherry picked from commit 44e35452e680c94c0b748551670069ff81bab02e)

CMakeLists.txt

index b83fbbd76627c3c5c9a2624de5e50feba1a69f6d..45d69229e0d686804195b9a6a0549f79e4c60697 100644 (file)
@@ -141,15 +141,17 @@ endif(MSVC)
 
 #
 # If we're building with MinGW, we need to specify _WIN32_WINNT as
-# 0x0600 ("NT 6.0", a/k/a Vista/Windows Server 2008) in order to
-# get the full IPv6 API, including inet_ntop().
+# 0x0600 ("NT 6.0", a/k/a Vista/Windows Server 2008) or higher
+# in order to get the full IPv6 API, including inet_ntop(), and we
+# need to specify it as 0x0601 ("NT 6.1", a/k/a Windows 7) or higher
+# in order to get NdisMediumIP.
 #
 # NOTE: pcap does *NOT* work with msvcrt.dll; it must link with
 # a newer version of the C library, i.e. Visual Studio 2015 or
 # later, as it depends on C99 features introduced in VS 2015.
 #
 if(MINGW)
-    add_definitions(-D_WIN32_WINNT=0x0600)
+    add_definitions(-D_WIN32_WINNT=0x0601)
 endif(MINGW)
 
 #