[libvirt] [PATCH] winsock2.h must always be included before windows.h
Eric Blake
eblake at redhat.com
Fri Jun 22 04:29:40 UTC 2012
On 06/21/2012 07:40 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> Some GNULIB headers (eg unistd.h) will often need to include
> winsock2.h for various symbols. There is a rule that winsock2.h
> must be included before windows.h. This means that any file
> which does
>
> #ifdef WIN32
> #include <windows.h>
> #endif
> #include <unistd.h>
>
> is potentially broken. A simple rule is that /all/ includes of
> windows.h must be matched with a preceeding include of winsock2.h
s/preceeding/preceding/
> regardless of whether unistd.h is used currently
> ---
> src/util/util.c | 3 +++
> src/vbox/vbox_MSCOMGlue.c | 3 +++
> 2 files changed, 6 insertions(+)
ACK.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120621/f77eacf6/attachment-0001.sig>
More information about the libvir-list
mailing list