]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix pthread_sigmask check for mingw32 without winpthreads
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 29 Jan 2014 13:54:11 +0000 (13:54 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 30 Jan 2014 18:00:20 +0000 (18:00 +0000)
On Fedora 19 and older the pthreads impl provided with
mingw does not have any pthread_sigmask impl at all. The
configure.ac check was not distinguishing this scenario
from that of a broken pthread_sigmask impl, so was
mistakenly enabling the libvirt workaround even when it
was not needed. This in turn conflicted with the gnulib
provided pthread_sigmask impl.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
configure.ac

index 1670a4115a40133c8427e554741730a17053ca56..70180ccec7a744368dc94409672e7e20225c4150 100644 (file)
@@ -285,8 +285,10 @@ AC_CACHE_CHECK([whether pthread_sigmask does anything],
     #include <sys/types.h>
     #include <signal.h>
   ]], [[
-   int (*foo)(int, const sigset_t *, sigset_t *) = &pthread_sigmask;
-   return !foo;
+    #ifdef pthread_sigmask
+    int (*foo)(int, const sigset_t *, sigset_t *) = &pthread_sigmask;
+    return !foo;
+    #endif
   ]])], [lv_cv_pthread_sigmask_works=yes], [lv_cv_pthread_sigmask_works=no])])
 if test "x$lv_cv_pthread_sigmask_works" != xyes; then
   AC_DEFINE([FUNC_PTHREAD_SIGMASK_BROKEN], [1],