Skip to content

Commit 5567754

Browse files
committed
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.
1 parent a74bdee commit 5567754

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

depends/packages/libevent.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ define $(package)_set_vars
1414
$(package)_config_opts=-DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_OPENSSL=ON
1515
$(package)_config_opts+=-DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_REGRESS=ON
1616
$(package)_config_opts+=-DEVENT__DISABLE_TESTS=ON -DEVENT__LIBRARY_TYPE=STATIC
17+
$(package)_cppflags += -D_GNU_SOURCE
1718
$(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601
1819

1920
ifeq ($(NO_HARDEN),)

0 commit comments

Comments
 (0)