diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-06-06 16:39:34 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-06-24 08:33:11 +0200 |
commit | bc45de8c21dfc3bc3896a78b33d5a6d9e710dfff (patch) | |
tree | eb73bc955db01dc4af94d0bc788635e012c0b03d /hw/usb | |
parent | 4e3d8b4b37b67ff6896ec77975eecbaabf7968a4 (diff) | |
download | qemu-bc45de8c21dfc3bc3896a78b33d5a6d9e710dfff.zip qemu-bc45de8c21dfc3bc3896a78b33d5a6d9e710dfff.tar.gz qemu-bc45de8c21dfc3bc3896a78b33d5a6d9e710dfff.tar.bz2 |
usb/host-libusb: Fix building with libusb git master code
The next libusb release will deprecate libusb_get_port_path, and since
we compile with -Werror, this breaks the build.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/host-libusb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 3a582c5..0c12b0f 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -241,7 +241,11 @@ static int usb_host_get_port(libusb_device *dev, char *port, size_t len) size_t off; int rc, i; +#if LIBUSBX_API_VERSION >= 0x01000102 + rc = libusb_get_port_numbers(dev, path, 7); +#else rc = libusb_get_port_path(ctx, dev, path, 7); +#endif if (rc < 0) { return 0; } |