Message ID | 20210122174849.3936119-2-kraxel@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [PULL,1/8] hw/usb/host-libusb.c: fix build with kernel < 5.0 | expand |
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index b950501d100f..295d20227ad3 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -941,7 +941,8 @@ static int usb_host_open(USBHostDevice *s, libusb_device *dev, int hostfd) usb_host_ep_update(s); libusb_speed = libusb_get_device_speed(dev); -#if LIBUSB_API_VERSION >= 0x01000107 && defined(CONFIG_LINUX) +#if LIBUSB_API_VERSION >= 0x01000107 && defined(CONFIG_LINUX) && \ + defined(USBDEVFS_GET_SPEED) if (hostfd && libusb_speed == 0) { /* * Workaround libusb bug: libusb_get_device_speed() does not