All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] w32: include winsock2.h before windows.h
Date: Tue, 9 Feb 2016 17:03:09 +0100	[thread overview]
Message-ID: <56BA0DBD.3060206@weilnetz.de> (raw)
In-Reply-To: <1455027417-32278-1-git-send-email-pbonzini@redhat.com>

Am 09.02.2016 um 15:16 schrieb 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.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  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 <windows.h>
>  #include <winsock2.h>
> +#include <windows.h>
>  
>  /* Workaround for older versions of MinGW. */
>  #ifndef ECONNREFUSED

Reviewed-by: Stefan Weil <sw@weilnetz.de>

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.

Without testing this, I think that Paolo's patch is needed
since commit e16f4c8770b73f530dad842a31298963b6c7e41d.

  parent reply	other threads:[~2016-02-09 16:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 14:16 [Qemu-devel] [PATCH] w32: include winsock2.h before windows.h Paolo Bonzini
2016-02-09 14:21 ` Daniel P. Berrange
2016-02-09 14:28   ` Peter Maydell
2016-02-09 14:37     ` Paolo Bonzini
2016-02-09 14:38       ` Peter Maydell
2016-02-09 16:03 ` Stefan Weil [this message]
2016-02-09 16:06   ` Paolo Bonzini
2016-02-11  5:56 ` Michael Tokarev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56BA0DBD.3060206@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.