From 2fd30e37220484f44b1cfb1ee9afbe6c8a0b43f0 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sat, 3 Aug 2019 00:32:28 +0100 Subject: [PATCH] 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 Signed-off-by: Eric Engestrom Reviewed-by: Matt Turner --- src/util/u_thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/u_thread.h b/src/util/u_thread.h index b240b446aa2..1648d2f5841 100644 --- a/src/util/u_thread.h +++ b/src/util/u_thread.h @@ -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 -- 2.30.2