depends: Fix zeromq build on OpenBSD

This commit is contained in:
Hennadii Stepanov 2024-07-31 23:37:50 +01:00
parent 66e82dc90c
commit 89b1d5c818
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F
2 changed files with 26 additions and 0 deletions

View File

@ -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

View File

@ -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()