$OpenBSD$ --- neo/idlib/sys/posix/posix_thread.cpp.orig Mon Jul 21 18:04:12 2014 +++ neo/idlib/sys/posix/posix_thread.cpp Mon Jul 21 20:01:32 2014 @@ -38,7 +38,7 @@ If you have questions concerning this license or the a #include "../../../sys/posix/posix_public.h" #endif -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__OpenBSD__) #include // for pthread_set_name_np #endif @@ -71,7 +71,7 @@ static int Sys_SetThreadName( pthread_t handle, const ret = pthread_setname_np( handle, name ); if( ret != 0 ) idLib::common->Printf( "Setting threadname \"%s\" failed, reason: %s (%i)\n", name, strerror( errno ), errno ); -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__OpenBSD__) // according to http://www.freebsd.org/cgi/man.cgi?query=pthread_set_name_np&sektion=3 // the interface is void pthread_set_name_np(pthread_t tid, const char *name); pthread_set_name_np( handle, name ); // doesn't return anything @@ -94,7 +94,7 @@ static int Sys_GetThreadName( pthread_t handle, char* ret = pthread_getname_np( handle, namebuf, buflen ); if( ret != 0 ) idLib::common->Printf( "Getting threadname failed, reason: %s (%i)\n", strerror( errno ), errno ); -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__OpenBSD__) // seems like there is no pthread_getname_np equivalent on FreeBSD idStr::snPrintf( namebuf, buflen, "Can't read threadname on this platform!" ); #endif