[libvirt] [PATCH v2 2/4] Remove windows thread implementation in favour of pthreads

Daniel P. Berrange berrange at redhat.com
Tue Jan 28 15:10:36 UTC 2014

On Mon, Jan 27, 2014 at 03:47:19PM -0700, Eric Blake wrote:
> On 01/27/2014 10:18 AM, Daniel P. Berrange wrote:
> > There are a number of pthreads impls available on Win32
> > these days, in particular the mingw64 project has a good
> > impl. Delete the native windows thread implementation and
> > rely on using pthreads everywhere.
> > 
> > Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> > ---
> I'm still a bit worried about alienating F19 or RHEL.

So I tested on F19 with this series applied and hit a small problem

  CC       util/libvirt_util_la-viraudit.lo
In file included from util/virstoragefile.h:28:0,
                 from util/virfile.h:32,
                 from util/viraudit.c:33:
util/virutil.h:118:19: error: conflicting types for 'pthread_sigmask'
 static inline int pthread_sigmask(int how,
In file included from util/viraudit.c:27:0:
../gnulib/lib/signal.h:451:1: note: previous declaration of 'pthread_sigmask' was here
 _GL_FUNCDECL_SYS (pthread_sigmask, int,

The problem seems to be our recently added configure.ac check from

  commit c91d13bd0ffde54905e7c5b0aedce2bb9c2b347e
  Author: Eric Blake <eblake at redhat.com>
  Date:   Fri Jan 10 14:01:10 2014 -0700

    build: fix build on mingw with winpthreads

The F19  pthreads.h does not define any pthread_sigmask function,
so our configure check fails and activates our dummy wrapper in
virutil.h.  Unfortunately gnulib has also detected the missing
pthread_sigmask and provided its own wrapper in signal.h and thus
we clash. We need to somehow make our configure.ac check detect
distinguish missing pthread_sigmask from broken pthread_sigmask

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

More information about the libvir-list mailing list