Skip to content

Commit ddaec96

Browse files
fanquakePastaPastaPasta
authored andcommitted
Merge bitcoin#30565: depends: Fix zeromq build on OpenBSD
89b1d5c depends: Fix `zeromq` build on OpenBSD (Hennadii Stepanov) Pull request description: On the master branch @ 66e82dc, the `zeromq` package fails to build on OpenBSD 7.5: ``` [ 19%] Building CXX object CMakeFiles/objects.dir/src/io_thread.cpp.o /home/hebasto/bitcoin/depends/work/build/amd64-unknown-openbsd7.5/zeromq/4.3.5-df5b1b9f936/src/io_thread.cpp:14:22: error: static_cast from 'std::nullptr_t' to 'poller_t::handle_t' (aka 'int') is not allowed _mailbox_handle (static_cast<poller_t::handle_t> (NULL)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ``` This [regression](bitcoin#29723 (comment)) was overlooked by me in bitcoin#29723. This PR fixes the issue by backporting an upstream commit from zeromq/libzmq#4659. ACKs for top commit: theStack: tACK 89b1d5c Tree-SHA512: 48d22ea99dfd44c5adf858c74e64082390da27b8ccad8c0d5a91d4dabfa3d12267cef98e4bb8c088e4cd0ec477c242cb1d47aace5c88cd86f796715bba957ed8
1 parent e4e5605 commit ddaec96

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

depends/packages/zeromq.mk

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ $(package)_patches = remove_libstd_link.patch
88
$(package)_patches += macos_mktemp_check.patch
99
$(package)_patches += builtin_sha1.patch
1010
$(package)_patches += fix_have_windows.patch
11+
$(package)_patches += openbsd_kqueue_headers.patch
1112
$(package)_patches += cmake_minimum.patch
1213
$(package)_patches += no_librt.patch
1314
$(package)_patches += fix_mingw_link.patch
@@ -28,6 +29,7 @@ define $(package)_preprocess_cmds
2829
patch -p1 < $($(package)_patch_dir)/macos_mktemp_check.patch && \
2930
patch -p1 < $($(package)_patch_dir)/builtin_sha1.patch && \
3031
patch -p1 < $($(package)_patch_dir)/fix_have_windows.patch && \
32+
patch -p1 < $($(package)_patch_dir)/openbsd_kqueue_headers.patch && \
3133
patch -p1 < $($(package)_patch_dir)/cmake_minimum.patch && \
3234
patch -p1 < $($(package)_patch_dir)/no_librt.patch && \
3335
patch -p1 < $($(package)_patch_dir)/fix_mingw_link.patch
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
commit ff231d267370493814f933d151441866bf1e200b
2+
Author: Min RK <[email protected]>
3+
Date: Fri Feb 23 13:21:08 2024 +0100
4+
5+
Problem: cmake search for kqueue missing headers
6+
7+
Solution: include sys/types.h and sys/time.h as documented by kqueue
8+
and used in autotools
9+
10+
fixes kqueue detection on openbsd
11+
12+
diff --git a/CMakeLists.txt b/CMakeLists.txt
13+
index f956f3fd..814d5d46 100644
14+
--- a/CMakeLists.txt
15+
+++ b/CMakeLists.txt
16+
@@ -380,7 +380,7 @@ endif(WIN32)
17+
18+
if(NOT MSVC)
19+
if(POLLER STREQUAL "")
20+
- check_cxx_symbol_exists(kqueue sys/event.h HAVE_KQUEUE)
21+
+ check_cxx_symbol_exists(kqueue "sys/types.h;sys/event.h;sys/time.h" HAVE_KQUEUE)
22+
if(HAVE_KQUEUE)
23+
set(POLLER "kqueue")
24+
endif()

0 commit comments

Comments
 (0)