Skip to content

Commit eb6b735

Browse files
committed
build: pass _WIN32_WINNT=0x0601 when building libevent for Windows
This enables of the use of AI_* definitions in the Windows headers, specifically AI_ADDRCONFIG, which fixes an issue with libevent and ipv6 on Windows. It also aligns with what we define in configure when building Core.
1 parent 03e056e commit eb6b735

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

depends/packages/libevent.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ define $(package)_preprocess_cmds
1010
./autogen.sh
1111
endef
1212

13+
# When building for Windows, we set _WIN32_WINNT to target the same Windows
14+
# version as we do in configure. Due to quirks in libevents build system, this
15+
# is also required to enable support for ipv6. See #19375.
1316
define $(package)_set_vars
1417
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples
1518
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
1619
$(package)_config_opts_release=--disable-debug-mode
1720
$(package)_config_opts_linux=--with-pic
1821
$(package)_config_opts_android=--with-pic
22+
$(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601
1923
endef
2024

2125
define $(package)_config_cmds

0 commit comments

Comments
 (0)