]> git.proxmox.com Git - mirror_qemu.git/commit
w32: include winsock2.h before windows.h
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 9 Feb 2016 14:16:57 +0000 (15:16 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 11 Feb 2016 12:15:47 +0000 (15:15 +0300)
commit1834ed3afc578b8dbf39838cfdf27d457771a334
tree10fceee8af46217b8ffc0993aa034485f61e2684
parent91dbeeda2d2cf85e733ddd86aa84de12bdf8cd4a
w32: include winsock2.h before windows.h

Recent Fedora complains while compiling ui/sdl.c:

    /usr/x86_64-w64-mingw32/sys-root/mingw/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]

And with this patch we dutifully obey.

Stefan Weil:

Without that patch, windows.h will include winsock.h
(which conflicts with winsock2.h) when compiling sdl.c.

Normally we define WIN32_LEAN_AND_MEAN, and
windows.h won't include winsock.h.

include/ui/sdl2.h and ui/sdl.c undefine that macro,
so the order of the include files is important.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
include/sysemu/os-win32.h