]> git.proxmox.com Git - mirror_qemu.git/commitdiff
usb-host: raise libusbx minimum version to 1.0.13
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 18 Apr 2013 10:16:44 +0000 (12:16 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 23 Apr 2013 06:43:10 +0000 (08:43 +0200)
Allows to remove one FIXME.  Makes LIBUSB_LOG_LEVEL_WARNING build errors
go away.  And starting with that version libusb has a LIBUSBX_API_VERSION
define which allows to easily #ifdef version dependencies should that
need arrive in the future.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
configure
hw/usb/host-libusb.c

index 51a6c5621c99f7f3623767f2b903143f99efee5f..33d3354ea30838694020660f5822f551293d7e9a 100755 (executable)
--- a/configure
+++ b/configure
@@ -3060,7 +3060,7 @@ fi
 
 # check for libusb
 if test "$libusb" != "no" ; then
-    if $pkg_config libusb-1.0 >/dev/null 2>&1 ; then
+    if $pkg_config --atleast-version=1.0.13 libusb-1.0 >/dev/null 2>&1 ; then
         libusb="yes"
        usb="libusb"
         libusb_cflags=$($pkg_config --cflags libusb-1.0 2>/dev/null)
index 29f35b392782677958f4af891fedda04e37823c0..d1186b8a9fcbc2b98b2822d953a3acd2e31db4e5 100644 (file)
@@ -236,8 +236,6 @@ static int usb_host_init(void)
 
 static int usb_host_get_port(libusb_device *dev, char *port, size_t len)
 {
-#if defined(LIBUSBX_API_VERSION) && (LIBUSBX_API_VERSION >= 0x010000ff)
-    /* have libusb_get_port_path() */
     uint8_t path[7];
     size_t off;
     int rc, i;
@@ -251,9 +249,6 @@ static int usb_host_get_port(libusb_device *dev, char *port, size_t len)
         off += snprintf(port+off, len-off, ".%d", path[i]);
     }
     return off;
-#else
-    return snprintf(port, len, "FIXME");
-#endif
 }
 
 static void usb_host_libusb_error(const char *func, int rc)