aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-05-16 14:17:49 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2019-05-16 14:19:06 +0200
commit47ec8318a6576f704d0c8c9795e2717f4e34cd1d (patch)
treee9dcf038758fcfe8cbb03e8522888b36cabbf1d4
parent2b56c9a86a9d349c4ada8fc81e071e02eb04837e (diff)
parent1b05dff080fe50937a02cfde661db58ace21c553 (diff)
Merge #15968: Fix portability issue with pthreads
1b05dff080fe50937a02cfde661db58ace21c553 Fix portability issue with pthreads (grim-trigger) Pull request description: This change resolves the following issue: https://github.com/bitcoin/bitcoin/issues/15951 Only tested on OpenBSD 6.5/amd64 ACKs for commit 1b05df: fanquake: tACK 1b05dff. Tested on OpenBSD6.4 (`vagrant`). laanwj: utACK 1b05dff080fe50937a02cfde661db58ace21c553 Tree-SHA512: af48581af32820d5adc9ae5abb44f8f1b592c323f86fe2484108b81629389f6ef347598f9a087aa6476ac553e59828cd7927bb4ab11dc70e7c9a944a92fc54ae
-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