diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2015-09-08 11:34:35 +0100 |
---|---|---|
committer | Stefan Weil <sw@weilnetz.de> | 2015-09-24 20:52:28 +0200 |
commit | c8f3f17cf1015d6621f79aa6a88280539621a108 (patch) | |
tree | 105176724cbad2a1be3ef5ca563228c9bde1ba77 /ui | |
parent | 7c9b2bf67775ecc1359ce973580807d173e7f710 (diff) | |
download | qemu-c8f3f17cf1015d6621f79aa6a88280539621a108.zip qemu-c8f3f17cf1015d6621f79aa6a88280539621a108.tar.gz qemu-c8f3f17cf1015d6621f79aa6a88280539621a108.tar.bz2 |
gtk: avoid redefining _WIN32_WINNT macro
When building for Mingw64 target on Fedora 22 a warning
is issued about _WIN32_WINNT being redefined.
In file included from ui/gtk.c:40:0:
include/ui/gtk.h:5:0: warning: "_WIN32_WINNT" redefined
# define _WIN32_WINNT 0x0601 /* needed to get definition of MAPVK_VK_TO_VSC */
^
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/crtdefs.h:10:0,
from /usr/i686-w64-mingw32/sys-root/mingw/include/stdio.h:9,
from /home/berrange/src/virt/qemu/include/qemu/fprintf-fn.h:12,
from /home/berrange/src/virt/qemu/include/qemu-common.h:18,
from ui/gtk.c:37:
/usr/i686-w64-mingw32/sys-root/mingw/include/_mingw.h:225:0: note: this is the location of the previous definition
#define _WIN32_WINNT 0x502
^
Rather than try to get MAPVK_VK_TO_VSC defined indirectly
by defining _WIN32_WINNT, instead just define it explicitly
if missing.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -104,6 +104,15 @@ #define GDK_KEY_Pause GDK_Pause #endif +/* Some older mingw versions lack this constant or have + * it conditionally defined */ +#ifdef _WIN32 +# ifndef MAPVK_VK_TO_VSC +# define MAPVK_VK_TO_VSC 0 +# endif +#endif + + #define HOTKEY_MODIFIERS (GDK_CONTROL_MASK | GDK_MOD1_MASK) static const int modifier_keycode[] = { |