Skip to content

Commit 13a399a

Browse files
theunifanquake
authored andcommitted
depends: patch pthread_set_name_np out of zeromq
1 parent 8f79226 commit 13a399a

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

depends/packages/zeromq.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ $(package)_version=4.2.3
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=8f1e2b2aade4dbfde98d82366d61baef2f62e812530160d2e6d0a5bb24e40bc0
6-
$(package)_patches=0001-fix-build-with-older-mingw64.patch
6+
$(package)_patches=0001-fix-build-with-older-mingw64.patch 0002-disable-pthread_set_name_np.patch
77

88
define $(package)_set_vars
99
$(package)_config_opts=--without-docs --disable-shared --without-libsodium --disable-curve --disable-curve-keygen --disable-perf
@@ -13,7 +13,7 @@ endef
1313

1414
define $(package)_preprocess_cmds
1515
patch -p1 < $($(package)_patch_dir)/0001-fix-build-with-older-mingw64.patch && \
16-
./autogen.sh
16+
patch -p1 < $($(package)_patch_dir)/0002-disable-pthread_set_name_np.patch
1717
endef
1818

1919
define $(package)_config_cmds
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From 6e6b47d5ab381c3df3b30bb0b0a6cf210dfb1eba Mon Sep 17 00:00:00 2001
2+
From: Cory Fields <[email protected]>
3+
Date: Mon, 5 Mar 2018 14:22:05 -0500
4+
Subject: [PATCH] disable pthread_set_name_np
5+
6+
pthread_set_name_np adds a Glibc requirement on >= 2.12.
7+
---
8+
src/thread.cpp | 4 +++-
9+
1 file changed, 3 insertions(+), 1 deletion(-)
10+
11+
diff --git a/src/thread.cpp b/src/thread.cpp
12+
index 4fc59c3e..c3fdfd46 100644
13+
--- a/src/thread.cpp
14+
+++ b/src/thread.cpp
15+
@@ -220,7 +220,7 @@ void zmq::thread_t::setThreadName(const char *name_)
16+
*/
17+
if (!name_)
18+
return;
19+
-
20+
+#if 0
21+
#if defined(ZMQ_HAVE_PTHREAD_SETNAME_1)
22+
int rc = pthread_setname_np(name_);
23+
if(rc) return;
24+
@@ -233,6 +233,8 @@ void zmq::thread_t::setThreadName(const char *name_)
25+
#elif defined(ZMQ_HAVE_PTHREAD_SET_NAME)
26+
pthread_set_name_np(descriptor, name_);
27+
#endif
28+
+#endif
29+
+ return;
30+
}
31+
32+
#endif
33+
--
34+
2.11.1
35+

0 commit comments

Comments
 (0)