[master] 534aeac Use some casting foo to get this building

Federico G. Schwindt fgsch at lodoss.net
Mon Dec 14 20:57:46 CET 2015


commit 534aeac48a797735278f596b5c43b3d396be5bf1
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Mon Dec 14 19:47:05 2015 +0000

    Use some casting foo to get this building
    
    NetBSD's pthread_setname_np(3) wants a void *. Sigh.

diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index 0f28302..8d2e8f0 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -98,7 +98,7 @@ THR_SetName(const char *name)
 #if defined(__APPLE__)
 	pthread_setname_np(name);
 #elif defined(__NetBSD__)
-	pthread_setname_np(pthread_self(), "%s", name);
+	pthread_setname_np(pthread_self(), "%s", (char *)(uintptr_t)name);
 #else
 	pthread_setname_np(pthread_self(), name);
 #endif



More information about the varnish-commit mailing list