diff --git a/src/xpdev/threadwrap.h b/src/xpdev/threadwrap.h
index 7665d0751c6384e42814af3f03f642591808851d..86d132cb34775df9a9a4acc9859cefb8d9700910 100644
--- a/src/xpdev/threadwrap.h
+++ b/src/xpdev/threadwrap.h
@@ -99,17 +99,13 @@ pthread_mutex_t pthread_mutex_initializer_np(BOOL recursive);
 
 #if defined(_POSIX_THREADS)
 
-#ifdef _DEBUG
- #if defined (__FreeBSD__) || defined (__OpenBSD__)
-  #include <pthread_np.h>
-  #define	SetThreadName(c)	pthread_set_name_np(pthread_self(),c)
- #elsif defined(__GLIBC__)
-  #include <features.h>
-  #if (__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12))
-   #define	SetThreadName(c)	pthread_setname_np(pthread_self(),c)
-  #endif
- #else
-  #define SetThreadName(c)
+#if defined (__FreeBSD__) || defined (__OpenBSD__)
+ #include <pthread_np.h>
+ #define	SetThreadName(c)	pthread_set_name_np(pthread_self(),c)
+#elsif defined(__GLIBC__)
+ #include <features.h>
+ #if (__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12))
+  #define	SetThreadName(c)	pthread_setname_np(pthread_self(),c)
  #endif
 #else
  #define SetThreadName(c)