aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgrim-trigger <36375872+grim-trigger@users.noreply.github.com>2019-05-07 00:17:33 +0000
committerGitHub <noreply@github.com>2019-05-07 00:17:33 +0000
commit1b05dff080fe50937a02cfde661db58ace21c553 (patch)
tree9c3c934aecbd9e97b01ec0f4883058a6e73a0ba5 /src
parent3632143ebbfdd4888571db800c8ee8d684eec57b (diff)
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')
-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 7b0d744aec..b221b0c975 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