0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-01 09:35:52 -05:00

depends: add zeromq mktemp macos patch

This commit is contained in:
fanquake 2024-07-15 16:32:27 +01:00
parent ed739d14b5
commit 0c8605253a
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1
2 changed files with 20 additions and 2 deletions

View file

@ -3,7 +3,8 @@ $(package)_version=4.3.5
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43
$(package)_patches=remove_libstd_link.patch
$(package)_patches = remove_libstd_link.patch
$(package)_patches += macos_mktemp_check.patch
define $(package)_set_vars
$(package)_config_opts = --without-docs --disable-shared --disable-valgrind
@ -14,7 +15,8 @@ define $(package)_set_vars
endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch
patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch && \
patch -p1 < $($(package)_patch_dir)/macos_mktemp_check.patch
endef
define $(package)_config_cmds

View file

@ -0,0 +1,16 @@
build: fix mkdtemp check on macOS
On macOS, mkdtemp is in unistd.h. Fix the CMake check so that is works.
Upstreamed in https://github.com/zeromq/libzmq/pull/4668.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -599,7 +599,7 @@ if(NOT MSVC)
check_cxx_symbol_exists(fork unistd.h HAVE_FORK)
check_cxx_symbol_exists(gethrtime sys/time.h HAVE_GETHRTIME)
- check_cxx_symbol_exists(mkdtemp stdlib.h HAVE_MKDTEMP)
+ check_cxx_symbol_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP)
check_cxx_symbol_exists(accept4 sys/socket.h HAVE_ACCEPT4)
check_cxx_symbol_exists(strnlen string.h HAVE_STRNLEN)
else()