util: fix pointer type on NetBSD

NetBSD expects a `void *` argument [1] as the printf-style arguments to
the formatting string, so we need to cast the `const` away.

[1] https://netbsd.gw.com/cgi-bin/man-cgi?pthread_setname_np++NetBSD-current

Suggested-by: Kamil Rytarowski <n54@gmx.com>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Eric Engestrom 2019-08-03 00:32:28 +01:00 committed by Eric Engestrom
parent b558fa4dfe
commit 2fd30e3722

View file

@ -67,7 +67,7 @@ static inline void u_thread_setname( const char *name )
#elif DETECT_OS_FREEBSD || DETECT_OS_OPENBSD
pthread_set_name_np(pthread_self(), name);
#elif DETECT_OS_NETBSD
pthread_setname_np(pthread_self(), "%s", name);
pthread_setname_np(pthread_self(), "%s", (void *)name);
#elif DETECT_OS_APPLE
pthread_setname_np(name);
#else