git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
configure: Distinguish glibc and NetBSD pthread_setname_np() variants.
[sliver-openvswitch.git]
/
lib
/
util.c
diff --git
a/lib/util.c
b/lib/util.c
index
6a72107
..
1751c6f
100644
(file)
--- a/
lib/util.c
+++ b/
lib/util.c
@@
-401,8
+401,10
@@
void
set_subprogram_name(const char *name)
{
free(subprogram_name_set(xstrdup(name)));
set_subprogram_name(const char *name)
{
free(subprogram_name_set(xstrdup(name)));
-#if HAVE_PTHREAD_SETNAME_NP
+#if HAVE_
GLIBC_
PTHREAD_SETNAME_NP
pthread_setname_np(pthread_self(), name);
pthread_setname_np(pthread_self(), name);
+#elif HAVE_NETBSD_PTHREAD_SETNAME_NP
+ pthread_setname_np(pthread_self(), "%s", name);
#elif HAVE_PTHREAD_SET_NAME_NP
pthread_set_name_np(pthread_self(), name);
#endif
#elif HAVE_PTHREAD_SET_NAME_NP
pthread_set_name_np(pthread_self(), name);
#endif