aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2024-08-28 17:35:29 +0100
committerfanquake <fanquake@gmail.com>2024-09-03 10:16:52 +0100
commit556775408797d8e27154c3edaf139820b0979cce (patch)
tree10fb9ba5be2f8880d9c426e175984f748c884c9b /depends
parenta74bdeea1b8e27b2335f0f7da78006e87ecfb235 (diff)
depends: build libevent with -D_GNU_SOURCE
Currently, builds of libevent in depends, using CMake, fail on some systems, like Alpine, with the following: ```bash /bitcoin/depends/work/build/aarch64-unknown-linux-musl/libevent/2.1.12-stable-1516ed47ea8/evmap.c: In function 'evmap_signal_add_': /bitcoin/depends/work/build/aarch64-unknown-linux-musl/libevent/2.1.12-stable-1516ed47ea8/evmap.c:456:31: error: 'NSIG' undeclared (first use in this function) 456 | if (sig < 0 || sig >= NSIG) ``` From what I can tell the `_GNU_SOURCE` "detection" in libevents CMake build system, never? really worked, and it's not clear what a nice fix is. For now, always use `_GNU_SOURCE` when building libevent in depends.
Diffstat (limited to 'depends')
-rw-r--r--depends/packages/libevent.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk
index 24e940eaa0..4c05e8a0a7 100644
--- a/depends/packages/libevent.mk
+++ b/depends/packages/libevent.mk
@@ -14,6 +14,7 @@ define $(package)_set_vars
$(package)_config_opts=-DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_OPENSSL=ON
$(package)_config_opts+=-DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_REGRESS=ON
$(package)_config_opts+=-DEVENT__DISABLE_TESTS=ON -DEVENT__LIBRARY_TYPE=STATIC
+ $(package)_cppflags += -D_GNU_SOURCE
$(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601
ifeq ($(NO_HARDEN),)