diff options
author | Peter Maydell | 2016-05-12 15:34:35 +0200 |
---|---|---|
committer | Peter Maydell | 2016-05-12 15:34:35 +0200 |
commit | f83b70f701923964aaf89e1203ddcef0dd48ed08 (patch) | |
tree | 796c1e08c9a56a30028ecf75b601ca9b189e0158 /hw/usb/host-libusb.c | |
parent | Open 2.7 development tree (diff) | |
parent | usb: Support compilation without poll.h (diff) | |
download | qemu-f83b70f701923964aaf89e1203ddcef0dd48ed08.tar.gz qemu-f83b70f701923964aaf89e1203ddcef0dd48ed08.tar.xz qemu-f83b70f701923964aaf89e1203ddcef0dd48ed08.zip |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20160511-1' into staging
usb: misc fixes
# gpg: Signature made Wed 11 May 2016 12:18:25 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-usb-20160511-1:
usb: Support compilation without poll.h
usb-mtp: fix usb_mtp_get_device_info so that libmtp on the guest doesn't complain
usb:xhci: no DMA on HC reset
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/usb/host-libusb.c')
-rw-r--r-- | hw/usb/host-libusb.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 6458a94485..8b774f4939 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -34,7 +34,9 @@ */ #include "qemu/osdep.h" +#ifndef CONFIG_WIN32 #include <poll.h> +#endif #include <libusb.h> #include "qapi/error.h" @@ -204,6 +206,8 @@ static const char *err_names[] = { static libusb_context *ctx; static uint32_t loglevel; +#ifndef CONFIG_WIN32 + static void usb_host_handle_fd(void *opaque) { struct timeval tv = { 0, 0 }; @@ -223,9 +227,13 @@ static void usb_host_del_fd(int fd, void *user_data) qemu_set_fd_handler(fd, NULL, NULL, NULL); } +#endif /* !CONFIG_WIN32 */ + static int usb_host_init(void) { +#ifndef CONFIG_WIN32 const struct libusb_pollfd **poll; +#endif int i, rc; if (ctx) { @@ -236,7 +244,9 @@ static int usb_host_init(void) return -1; } libusb_set_debug(ctx, loglevel); - +#ifdef CONFIG_WIN32 + /* FIXME: add support for Windows. */ +#else libusb_set_pollfd_notifiers(ctx, usb_host_add_fd, usb_host_del_fd, ctx); @@ -247,6 +257,7 @@ static int usb_host_init(void) } } free(poll); +#endif return 0; } |