summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-08-03 00:32:28 +0100
committerEric Engestrom <[email protected]>2019-08-03 00:20:21 +0000
commit2fd30e37220484f44b1cfb1ee9afbe6c8a0b43f0 (patch)
tree69cf194cab9a5161b114df1e7212709aa69d0fa6 /src
parentb558fa4dfed2adea664552ddca6a86b6d66b62a8 (diff)
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 <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/util/u_thread.h2
1 files changed, 1 insertions, 1 deletions
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