Skip to content

Commit 79772cd

Browse files
committed
Merge bitcoin/bitcoin#30743: depends: build libevent with -D_GNU_SOURCE
5567754 depends: build libevent with -D_GNU_SOURCE (fanquake) Pull request description: 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, primarily relies on looking for a deprecated define, and it's not clear what a nice fix is. For now, always build with `_GNU_SOURCE`, to match the autotools behaviour. ACKs for top commit: TheCharlatan: ACK 5567754 Tree-SHA512: 4552b4a92867e8fa2af0ffa39b2be6c994bf739de7ce6a7c581590be486da81f7d93fca816854548c1e912347d33a35218c441b5058c3cbd3e82c74a9b7c78d9
2 parents f794a0d + 5567754 commit 79772cd

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)