From dad3655a6d6371f03d86ba90ab0e86cfa34bcf4f Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 7 Aug 2014 22:56:58 -0600 Subject: Use pthread_set_name_np() on OpenBSD. --- src/common/thread.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/common/thread.cpp') diff --git a/src/common/thread.cpp b/src/common/thread.cpp index c70ee37c..7341035c 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp @@ -7,7 +7,7 @@ #ifdef __APPLE__ #include -#elif defined BSD4_4 +#elif defined(BSD4_4) || defined(__OpenBSD__) #include #endif @@ -123,6 +123,8 @@ void SetCurrentThreadName(const char* szThreadName) { #ifdef __APPLE__ pthread_setname_np(szThreadName); +#elif defined(__OpenBSD__) + pthread_set_name_np(pthread_self(), szThreadName); #else pthread_setname_np(pthread_self(), szThreadName); #endif -- cgit v1.2.3