From 16d40a15783f9181d64082fc00a970dff485798f Mon Sep 17 00:00:00 2001 From: Sitsofe Wheeler Date: Sat, 22 Aug 2020 20:40:58 +0100 Subject: [PATCH] configure: be explicit about "XP" Windows API version With a Cygwin Mingw-w64 environment, when an explicit Windows API version define isn't set the Windows Server 2003 API is targeted (https://github.com/mirror/mingw-w64/blob/a25dc933f3d3ed6c8529fb24b7ae393f8792ca69/mingw-w64-headers/include/sdkddkver.h#L166 ). This means the XP build was actually misnamed and have never been fully compatible with plain XP for many years (I suspect such binaries will likely still work on XP bar trying to use the net ioengine)... With an MSYS2 Mingw-w64 environment, the default Windows API version is Windows 7 (https://github.com/msys2/MINGW-packages/blob/e9f271c61a39076ab5de56299f7fd86020c280ae/mingw-w64-headers-git/PKGBUILD#L55 ) which breaks an "XP" build because we were were relying on the default being 2003. Fix this by making the "XP" build explicitly target the Windows Server 2003 API. Signed-off-by: Sitsofe Wheeler --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 79a5134d..43433657 100755 --- a/configure +++ b/configure @@ -394,6 +394,8 @@ CYGWIN*) fi if test "$target_win_ver" = "XP"; then output_sym "CONFIG_WINDOWS_XP" + # Technically the below is targeting 2003 + CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0502" elif test "$target_win_ver" = "7"; then output_sym "CONFIG_WINDOWS_7" CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0601" -- 2.25.1