c91d13b build: fix build on mingw with winpthreads

Authored and Committed by ericb 10 years ago
    build: fix build on mingw with winpthreads
    
    On my Fedora 20 box with mingw cross-compiler, the build failed with:
    
    ../../src/rpc/virnetclient.c: In function 'virNetClientSetTLSSession':
    ../../src/rpc/virnetclient.c:745:14: error: unused variable 'oldmask' [-Werror=unused-variable]
         sigset_t oldmask, blockedsigs;
                  ^
    
    I traced it to the fact that mingw64-winpthreads installs a header
    that does #define pthread_sigmask(...) 0, which means any argument
    only ever passed to pthread_sigmask is reported as unused.  This
    patch works around the compilation failure, with behavior no worse
    than what mingw already gives us regarding the function being a
    no-op.
    
    * configure.ac (pthread_sigmask): Probe for broken mingw macro.
    * src/util/virutil.h (pthread_sigmask): Rewrite to something that
    avoids unused variables.
    
    Signed-off-by: Eric Blake <eblake@redhat.com>
    
        
file modified
+17 -1
file modified
+19 -5