]> xenbits.xensource.com Git - libvirt.git/commit
winsock2.h must always be included before windows.h
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 21 Jun 2012 13:37:34 +0000 (14:37 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 25 Jun 2012 09:41:10 +0000 (10:41 +0100)
commit931b7d194a7cf17f1d6eb0132fcbc52ee3c671a7
treeadb7a41fe395bd81b679f1153b4f2198435395bf
parent6a714d31d0d68c62e73d264554e4ef86a0f06686
winsock2.h must always be included before windows.h

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 preceding include of winsock2.h
regardless of whether unistd.h is used currently

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/util/util.c
src/vbox/vbox_MSCOMGlue.c