util: Cygwin has linux-style pthread_setname_np
authorJon Turney <jon.turney@dronecode.org.uk>
Wed, 7 Aug 2019 00:48:36 +0000 (01:48 +0100)
committerJon Turney <jon.turney@dronecode.org.uk>
Fri, 9 Aug 2019 12:46:43 +0000 (12:46 +0000)
Fixes: dcf9d91a ("util: Handle differences in pthread_setname_np")
src/util/u_thread.h

index c6b35d0814ba08cd172cddea7fb1d677d9c1f17f..26c76d78c0551681ecc5fa4fe10b4c7da75e12cb 100644 (file)
@@ -69,7 +69,7 @@ static inline thrd_t u_thread_create(int (*routine)(void *), void *param)
 static inline void u_thread_setname( const char *name )
 {
 #if defined(HAVE_PTHREAD)
-#if DETECT_OS_LINUX
+#if DETECT_OS_LINUX || DETECT_OS_CYGWIN
    pthread_setname_np(pthread_self(), name);
 #elif DETECT_OS_FREEBSD || DETECT_OS_OPENBSD
    pthread_set_name_np(pthread_self(), name);