aboutsummaryrefslogtreecommitdiff
path: root/hw/usb
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
parent6741d38ad0f2405a6e999ebc9550801b01aca479 (diff)
downloadqemu-0ab6d12ffde7e9235a1b9d79437f5bdda5d80cf1.zip
qemu-0ab6d12ffde7e9235a1b9d79437f5bdda5d80cf1.tar.gz
qemu-0ab6d12ffde7e9235a1b9d79437f5bdda5d80cf1.tar.bz2
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')
-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 38a5393..cbcc218 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))