From: Tobias Stoeckmann Date: Fri, 23 May 2025 17:22:06 +0000 (+0200) Subject: configure.ac: Improve Windows version detection X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2631%2Fhead;p=thirdparty%2Flibarchive.git configure.ac: Improve Windows version detection Include windows.h for better windows version detection. Fixes https://github.com/libarchive/libarchive/issues/2628 Signed-off-by: Tobias Stoeckmann --- diff --git a/configure.ac b/configure.ac index 09795d846..e772d4078 100644 --- a/configure.ac +++ b/configure.ac @@ -258,7 +258,8 @@ AM_CONDITIONAL([STATIC_BSDCPIO], [ test "$static_bsdcpio" = yes ]) case $host in *mingw* | *cygwin* | *msys* ) AC_PREPROC_IFELSE([AC_LANG_PROGRAM( - [[#ifdef _WIN32_WINNT + [[#include + #ifdef _WIN32_WINNT # error _WIN32_WINNT already defined #endif ]],[[;]]) @@ -267,7 +268,8 @@ case $host in AC_DEFINE([NTDDI_VERSION], 0x05020000, [Define to '0x05020000' for Windows Server 2003 APIs.]) ]) AC_PREPROC_IFELSE([AC_LANG_PROGRAM( - [[#ifdef WINVER + [[#include + #ifdef WINVER # error WINVER already defined #endif ]],[[;]])