aboutsummaryrefslogtreecommitdiff
path: root/src/util/threadnames.cpp
diff options
context:
space:
mode:
authorgrim-trigger <[email protected]>2019-05-07 00:17:33 +0000
committerGitHub <[email protected]>2019-05-07 00:17:33 +0000
commit1b05dff080fe50937a02cfde661db58ace21c553 (patch)
tree9c3c934aecbd9e97b01ec0f4883058a6e73a0ba5 /src/util/threadnames.cpp
parentMerge #14266: refactor: Lift prevector default vals to the member declaration (diff)
downloaddiscoin-1b05dff080fe50937a02cfde661db58ace21c553.tar.xz
discoin-1b05dff080fe50937a02cfde661db58ace21c553.zip
Fix portability issue with pthreads
This change resolves the following issue: https://github.com/bitcoin/bitcoin/issues/15951 Only tested on OpenBSD 6.5/amd64
Diffstat (limited to 'src/util/threadnames.cpp')
-rw-r--r--src/util/threadnames.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/threadnames.cpp b/src/util/threadnames.cpp
index 7b0d744ae..b221b0c97 100644
--- a/src/util/threadnames.cpp
+++ b/src/util/threadnames.cpp
@@ -9,6 +9,11 @@
#include <atomic>
#include <thread>
+#if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
+#include <pthread.h>
+#include <pthread_np.h>
+#endif
+
#include <util/threadnames.h>
#ifdef HAVE_SYS_PRCTL_H