diff --git a/configure b/configure index 73e647a9a..ec5ac3c77 100755 --- a/configure +++ b/configure @@ -13815,7 +13815,7 @@ done if test $ac_cv_func_pthread_set_name_np == yes; then cat >>confdefs.h <<\_ACEOF -#define PTHREAD_SETNAME(a,b) pthread_set_name_np(b) +#define PTHREAD_SETNAME(a,b) {pthread_set_name_np(b) _ACEOF else diff --git a/configure.ac b/configure.ac index 8784cb639..d9b9143ce 100644 --- a/configure.ac +++ b/configure.ac @@ -1751,8 +1751,8 @@ CFLAGS=$saved_CFLAGS AC_CHECK_FUNCS(pthread_set_name_np) if test $ac_cv_func_pthread_set_name_np == yes; then - AC_DEFINE(PTHREAD_SETNAME(a,b), pthread_set_name_np(b), - [Description: Define set name function for pthread]) + AC_DEFINE(PTHREAD_SETNAME(a,b), {pthread_set_name_np(b),0} + [Description: Define set_name function for pthread returning void]) else AC_CACHE_CHECK( [for pthread_setname_np() variant], @@ -1769,11 +1769,11 @@ else case $gs_cv_pthread_setname_np in glibc) AC_DEFINE(PTHREAD_SETNAME(a,b), pthread_setname_np(a,b), - [Description: Define set name function for pthread]) + [Description: Define setname function for pthread with two args]) ;; netbsd) AC_DEFINE(PTHREAD_SETNAME(a,b), pthread_setname_np(a,"%s",b), - [Description: Define set name function for pthread]) + [Description: Define setname function for pthread with three args]) ;; esac fi