aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-04-24 16:35:53 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-04-24 16:36:00 +0200
commit1623f6e3375430b42e7120dc02e8df8c7c22fc16 (patch)
tree93ca42e683052b532112faa3d39c5212e03451cc /src/util.cpp
parentb9311fb6312075744418942e143325ec1f66dd5c (diff)
parentcd558b421c3dec7ac491852de5a53475aa6bb38e (diff)
Merge pull request #6033
cd558b4 FreeBSD, OpenBSD thread renaming. (sinetek)
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 5fef3a40dd..1bb7df7085 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -7,6 +7,11 @@
#include "config/bitcoin-config.h"
#endif
+#if (defined(__FreeBSD__) || defined(__OpenBSD__))
+#include <pthread.h>
+#include <pthread_np.h>
+#endif
+
#include "util.h"
#include "chainparamsbase.h"
@@ -707,10 +712,7 @@ void RenameThread(const char* name)
#if defined(PR_SET_NAME)
// Only the first 15 characters are used (16 - NUL terminator)
::prctl(PR_SET_NAME, name, 0, 0, 0);
-#elif 0 && (defined(__FreeBSD__) || defined(__OpenBSD__))
- // TODO: This is currently disabled because it needs to be verified to work
- // on FreeBSD or OpenBSD first. When verified the '0 &&' part can be
- // removed.
+#elif (defined(__FreeBSD__) || defined(__OpenBSD__))
pthread_set_name_np(pthread_self(), name);
#elif defined(MAC_OSX)