Skip to content

Commit 0c86052

Browse files
committed
depends: add zeromq mktemp macos patch
1 parent ed739d1 commit 0c86052

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

depends/packages/zeromq.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ $(package)_version=4.3.5
33
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
44
$(package)_file_name=$(package)-$($(package)_version).tar.gz
55
$(package)_sha256_hash=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43
6-
$(package)_patches=remove_libstd_link.patch
6+
$(package)_patches = remove_libstd_link.patch
7+
$(package)_patches += macos_mktemp_check.patch
78

89
define $(package)_set_vars
910
$(package)_config_opts = --without-docs --disable-shared --disable-valgrind
@@ -14,7 +15,8 @@ define $(package)_set_vars
1415
endef
1516

1617
define $(package)_preprocess_cmds
17-
patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch
18+
patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch && \
19+
patch -p1 < $($(package)_patch_dir)/macos_mktemp_check.patch
1820
endef
1921

2022
define $(package)_config_cmds
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
build: fix mkdtemp check on macOS
2+
3+
On macOS, mkdtemp is in unistd.h. Fix the CMake check so that is works.
4+
Upstreamed in https://github.com/zeromq/libzmq/pull/4668.
5+
6+
--- a/CMakeLists.txt
7+
+++ b/CMakeLists.txt
8+
@@ -599,7 +599,7 @@ if(NOT MSVC)
9+
10+
check_cxx_symbol_exists(fork unistd.h HAVE_FORK)
11+
check_cxx_symbol_exists(gethrtime sys/time.h HAVE_GETHRTIME)
12+
- check_cxx_symbol_exists(mkdtemp stdlib.h HAVE_MKDTEMP)
13+
+ check_cxx_symbol_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP)
14+
check_cxx_symbol_exists(accept4 sys/socket.h HAVE_ACCEPT4)
15+
check_cxx_symbol_exists(strnlen string.h HAVE_STRNLEN)
16+
else()

0 commit comments

Comments
 (0)