Commit bc45de8c authored by Hans de Goede's avatar Hans de Goede Committed by Gerd Hoffmann
Browse files

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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 4e3d8b4b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
    }