Merge #15968: Fix portability issue with pthreads

1b05dff080 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 1b05dff080

Tree-SHA512: af48581af32820d5adc9ae5abb44f8f1b592c323f86fe2484108b81629389f6ef347598f9a087aa6476ac553e59828cd7927bb4ab11dc70e7c9a944a92fc54ae
This commit is contained in:
Wladimir J. van der Laan 2019-05-16 14:17:49 +02:00
commit 47ec8318a6
No known key found for this signature in database
GPG Key ID: 1E4AED62986CD25D

View File

@ -9,6 +9,11 @@
#include <atomic> #include <atomic>
#include <thread> #include <thread>
#if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
#include <pthread.h>
#include <pthread_np.h>
#endif
#include <util/threadnames.h> #include <util/threadnames.h>
#ifdef HAVE_SYS_PRCTL_H #ifdef HAVE_SYS_PRCTL_H