Skip to content

Commit

Permalink
depends: Fix zeromq build on OpenBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Jul 31, 2024
1 parent 66e82dc commit 89b1d5c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions depends/packages/zeromq.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
24 changes: 24 additions & 0 deletions depends/patches/zeromq/openbsd_kqueue_headers.patch
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 89b1d5c

Please sign in to comment.