depends: fix libevent _WIN32_WINNT usage

Starting with version 13.x, the mingw headers will define the value of
NTDDI_VERSION, based on the value of _WIN32_WINNT, if that version is <
Windows 10. Given that libevent was undefining our _WIN32_WINNT, and
redefining it to a value < Windows 10 (0x0501), NTDDI_VERSION was also
being defined to that value, leading to functions not being exposed in
the mingw-w64 headers; see here:
https://github.com/mingw-w64/mingw-w64/blob/9c2668ef77e75ea4d8a6c7d100b14643269caec3/mingw-w64-headers/include/iphlpapi.h#L36-L41.

Imports a commit from usptream (a14ff91254f40cf36e0fee199e26fb11260fab49).

Fixes #32707.
This commit is contained in:
fanquake committed 2025-07-11 10:25:04 +01:00
1 parent 3c1418666b
commit f5647c6c5a
2 files changed
+125 -1

No files matched your search

+3 -1
View File
@@ -5,6 +5,7 @@ $(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
$(package)_patches=cmake_fixups.patch
$(package)_patches += netbsd_fixup.patch
$(package)_patches += winver_fixup.patch
$(package)_build_subdir=build
# When building for Windows, we set _WIN32_WINNT to target the same Windows
@@ -21,7 +22,8 @@ endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch && \
patch -p1 < $($(package)_patch_dir)/netbsd_fixup.patch
patch -p1 < $($(package)_patch_dir)/netbsd_fixup.patch && \
patch -p1 < $($(package)_patch_dir)/winver_fixup.patch
endef
define $(package)_config_cmds