summary refs log tree commit diff stats
path: root/hw/usb/redirect.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2016-03-16 21:17:19 +0100
committerGerd Hoffmann <kraxel@redhat.com>2016-03-18 13:13:30 +0100
commit0ab6d12ffde7e9235a1b9d79437f5bdda5d80cf1 (patch)
treef613cd01bbcf8d035ed6b2e860e5afafd894d4e0 /hw/usb/redirect.c
parent6741d38ad0f2405a6e999ebc9550801b01aca479 (diff)
downloadfocaccia-qemu-0ab6d12ffde7e9235a1b9d79437f5bdda5d80cf1.tar.gz
focaccia-qemu-0ab6d12ffde7e9235a1b9d79437f5bdda5d80cf1.zip
usb: Fix compilation for Windows
Mingw-w64 does not provide sys/ioctl.h and Linux builds don't need it,
so remove that include statement.

ERROR is defined by wingdi.h (included via windows.h). Undefine it before
it is redefined to avoid a compiler warning / error.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1458159439-32322-1-git-send-email-sw@weilnetz.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/redirect.c')
-rw-r--r--hw/usb/redirect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 38a539311b..cbcc218183 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -34,12 +34,14 @@
 #include "qemu/iov.h"
 #include "sysemu/char.h"
 
-#include <sys/ioctl.h>
 #include <usbredirparser.h>
 #include <usbredirfilter.h>
 
 #include "hw/usb.h"
 
+/* ERROR is defined below. Remove any previous definition. */
+#undef ERROR
+
 #define MAX_ENDPOINTS 32
 #define NO_INTERFACE_INFO 255 /* Valid interface_count always <= 32 */
 #define EP2I(ep_address) (((ep_address & 0x80) >> 3) | (ep_address & 0x0f))