[PATCH] for MinGW Re: [Libvir] Pthreads error in windows compilation

Richard W.M. Jones rjones at redhat.com
Wed Feb 6 18:26:04 UTC 2008


Atsushi SAKAI wrote:
> Hi,
> 
>  Today I recognized.
> It would be better to write #include <pthread.h> in hash.h than hash.c.
> And compilation works if configure.in changes in MINGW?
> Would you apply this patch?

I think actually it's better to push the '#include <pthread.h>' all the 
way up into src/internal.h.  It's required in other places, eg. in 
src/libvirt.c.

However, the biggest problem I have is I don't have pthread.h in MinGW. 
  Where do you get pthread from for MinGW?

About the other part of this patch:

-    MINGW_EXTRA_LDFLAGS="-no-undefined"
+    MINGW_EXTRA_LDFLAGS="-lintl -lpthreadGC2"

'-no-undefined' is required in order to get libtool to build a DLL.

Rich.

-- 
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080206/54dbb271/attachment-0001.bin>


More information about the libvir-list mailing list