aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-07-31 23:37:50 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-07-31 23:37:50 +0100
commit89b1d5c818a33440c0c497aa78721fb9b0af35a5 (patch)
treeb5181a7accbf986dd98621303cc61fcf5569b0fc /depends
parent66e82dc90c598c9c42ff980693ef5367a845e1d0 (diff)
depends: Fix `zeromq` build on OpenBSD
Diffstat (limited to 'depends')
-rw-r--r--depends/packages/zeromq.mk2
-rw-r--r--depends/patches/zeromq/openbsd_kqueue_headers.patch24
2 files changed, 26 insertions, 0 deletions
diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk
index 295c9fdec0..7620df5477 100644
--- a/depends/packages/zeromq.mk
+++ b/depends/packages/zeromq.mk
@@ -8,6 +8,7 @@ $(package)_patches = remove_libstd_link.patch
$(package)_patches += macos_mktemp_check.patch
$(package)_patches += builtin_sha1.patch
$(package)_patches += fix_have_windows.patch
+$(package)_patches += openbsd_kqueue_headers.patch
$(package)_patches += cmake_minimum.patch
$(package)_patches += no_librt.patch
@@ -25,6 +26,7 @@ define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/macos_mktemp_check.patch && \
patch -p1 < $($(package)_patch_dir)/builtin_sha1.patch && \
patch -p1 < $($(package)_patch_dir)/fix_have_windows.patch && \
+ patch -p1 < $($(package)_patch_dir)/openbsd_kqueue_headers.patch && \
patch -p1 < $($(package)_patch_dir)/cmake_minimum.patch && \
patch -p1 < $($(package)_patch_dir)/no_librt.patch
endef
diff --git a/depends/patches/zeromq/openbsd_kqueue_headers.patch b/depends/patches/zeromq/openbsd_kqueue_headers.patch
new file mode 100644
index 0000000000..7000e209fe
--- /dev/null
+++ b/depends/patches/zeromq/openbsd_kqueue_headers.patch
@@ -0,0 +1,24 @@
+commit ff231d267370493814f933d151441866bf1e200b
+Author: Min RK <benjaminrk@gmail.com>
+Date: Fri Feb 23 13:21:08 2024 +0100
+
+ Problem: cmake search for kqueue missing headers
+
+ Solution: include sys/types.h and sys/time.h as documented by kqueue
+ and used in autotools
+
+ fixes kqueue detection on openbsd
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f956f3fd..814d5d46 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -380,7 +380,7 @@ endif(WIN32)
+
+ if(NOT MSVC)
+ if(POLLER STREQUAL "")
+- check_cxx_symbol_exists(kqueue sys/event.h HAVE_KQUEUE)
++ check_cxx_symbol_exists(kqueue "sys/types.h;sys/event.h;sys/time.h" HAVE_KQUEUE)
+ if(HAVE_KQUEUE)
+ set(POLLER "kqueue")
+ endif()