From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT9AW-0005z4-RR for qemu-devel@nongnu.org; Tue, 09 Feb 2016 09:21:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aT9AT-00038d-0e for qemu-devel@nongnu.org; Tue, 09 Feb 2016 09:21:28 -0500 Date: Tue, 9 Feb 2016 14:21:21 +0000 From: "Daniel P. Berrange" Message-ID: <20160209142120.GM24614@redhat.com> References: <1455027417-32278-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1455027417-32278-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] w32: include winsock2.h before windows.h Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org On Tue, Feb 09, 2016 at 03:16:57PM +0100, Paolo Bonzini wrote: > 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. > > Signed-off-by: Paolo Bonzini > --- > 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 include/qemu/sockets.h also has windows.h included before winsock2.h Presumably it didn't cause a failure for you because everything using sockets.h already pulls in osdep.h. A reason to prune sockets.h headers perhaps. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|