util: Solaris has linux-style pthread_setname_np

Fixes: dcf9d91a ("util: Handle differences in pthread_setname_np")

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit 7040795a69)
This commit is contained in:
Alan Coopersmith 2019-10-07 18:10:43 -07:00 committed by Dylan Baker
parent 45aa00da9f
commit 55a04df479

View 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 || DETECT_OS_CYGWIN
#if DETECT_OS_LINUX || DETECT_OS_CYGWIN || DETECT_OS_SOLARIS
pthread_setname_np(pthread_self(), name);
#elif DETECT_OS_FREEBSD || DETECT_OS_OPENBSD
pthread_set_name_np(pthread_self(), name);