static char *program_version;
/* Buffer used by ovs_strerror(). */
-DEFINE_PER_THREAD_DATA(struct { char s[128]; }, strerror_buffer, { "" });
+DEFINE_STATIC_PER_THREAD_DATA(struct { char s[128]; },
+ strerror_buffer,
+ { "" });
void
ovs_assert_failure(const char *where, const char *function,
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);
+#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