[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[qemu-xen master] usb: fix usb-host build on windows.



commit 631009e775a91018a62e2670b4473e99916f858f
Author:     Gerd Hoffmann <kraxel@xxxxxxxxxx>
AuthorDate: Wed Jun 24 15:45:10 2020 +0200
Commit:     Gerd Hoffmann <kraxel@xxxxxxxxxx>
CommitDate: Mon Jul 13 11:46:51 2020 +0200

    usb: fix usb-host build on windows.
    
    Seems the new API is not available on windows.
    Update #ifdefs accordingly.
    
    Fixes: 9f815e83e983 ("usb: add hostdevice property to usb-host")
    Reported-by: Howard Spoelstra <hsp.cat7@xxxxxxxxx>
    Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>
    Reviewed-by: Philippe Mathieu-Daudé <f4bug@xxxxxxxxx>
    Tested-by: Howard Spoelstra <hsp.cat7@xxxxxxxxx>
    Message-id: 20200624134510.9381-1-kraxel@xxxxxxxxxx
---
 hw/usb/host-libusb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index ad7ed8fb0c..c474551d84 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -907,7 +907,7 @@ static int usb_host_open(USBHostDevice *s, libusb_device 
*dev, int hostfd)
             goto fail;
         }
     } else {
-#if LIBUSB_API_VERSION >= 0x01000107
+#if LIBUSB_API_VERSION >= 0x01000107 && !defined(CONFIG_WIN32)
         trace_usb_host_open_hostfd(hostfd);
 
         rc = libusb_wrap_sys_device(ctx, hostfd, &s->dh);
@@ -1107,7 +1107,7 @@ static void usb_host_realize(USBDevice *udev, Error 
**errp)
     QTAILQ_INIT(&s->isorings);
     s->hostfd = -1;
 
-#if LIBUSB_API_VERSION >= 0x01000107
+#if LIBUSB_API_VERSION >= 0x01000107 && !defined(CONFIG_WIN32)
     if (s->hostdevice) {
         int fd;
         s->needs_autoscan = false;
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.