From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTqLJ-0006As-6a for qemu-devel@nongnu.org; Thu, 11 Feb 2016 07:27:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTqLG-00005c-GP for qemu-devel@nongnu.org; Thu, 11 Feb 2016 07:27:29 -0500 From: Michael Tokarev Date: Thu, 11 Feb 2016 15:19:03 +0300 Message-Id: <1834ed3afc578b8dbf39838cfdf27d457771a334.1455192968.git.mjt@msgid.tls.msk.ru> In-Reply-To: References: Subject: [Qemu-devel] [PULL 14/14] w32: include winsock2.h before windows.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Paolo Bonzini , Michael Tokarev From: Paolo Bonzini 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 Reviewed-by: Stefan Weil Signed-off-by: Michael Tokarev --- include/sysemu/os-win32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h index 400e098..fbed346 100644 --- a/include/sysemu/os-win32.h +++ b/include/sysemu/os-win32.h @@ -26,8 +26,8 @@ #ifndef QEMU_OS_WIN32_H #define QEMU_OS_WIN32_H -#include #include +#include /* Workaround for older versions of MinGW. */ #ifndef ECONNREFUSED -- 2.1.4