diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/thread/Name.hxx | 8 |
2 files changed, 7 insertions, 2 deletions
@@ -5,6 +5,7 @@ ver 0.19.8 (not yet released) - dsdiff, dsf: allow ID3 tags larger than 4 kB - ffmpeg: support interleaved floating point * fix clang 3.6 warnings +* fix build failure on NetBSD ver 0.19.7 (2014/12/17) * input diff --git a/src/thread/Name.hxx b/src/thread/Name.hxx index 872702af2..0fbad0fd2 100644 --- a/src/thread/Name.hxx +++ b/src/thread/Name.hxx @@ -20,7 +20,7 @@ #ifndef MPD_THREAD_NAME_HXX #define MPD_THREAD_NAME_HXX -#ifdef HAVE_PTHREAD_SETNAME_NP +#if defined(HAVE_PTHREAD_SETNAME_NP) && !defined(__NetBSD__) # define HAVE_THREAD_NAME # include <pthread.h> # include <stdio.h> @@ -34,7 +34,11 @@ static inline void SetThreadName(const char *name) { -#ifdef HAVE_PTHREAD_SETNAME_NP +#if defined(HAVE_PTHREAD_SETNAME_NP) && !defined(__NetBSD__) + /* not using pthread_setname_np() on NetBSD because it + requires a non-const pointer argument, which we don't have + here */ + #ifdef __APPLE__ pthread_setname_np(name); #else |