From: Guy Harris Date: Sat, 26 Jun 2021 02:06:58 +0000 (-0700) Subject: CMake: force _WIN32_WINNT to be Windows 7 when building for MinGW. X-Git-Tag: libpcap-1.10.2~399 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/71fe13072436bd408be2b3ced991cf2300440790 CMake: force _WIN32_WINNT to be Windows 7 when building for MinGW. That will make ntddndis.h define NdisMediumIP, which we will need. (cherry picked from commit 44e35452e680c94c0b748551670069ff81bab02e) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b83fbbd7..45d69229 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) #