From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUYe8-0004kN-JU for qemu-devel@nongnu.org; Tue, 23 Apr 2013 04:32:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUYe5-0001Ll-Ey for qemu-devel@nongnu.org; Tue, 23 Apr 2013 04:32:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUYe5-0001LA-88 for qemu-devel@nongnu.org; Tue, 23 Apr 2013 04:32:13 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3N8WCiA027846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 23 Apr 2013 04:32:12 -0400 From: Gerd Hoffmann Date: Tue, 23 Apr 2013 10:32:09 +0200 Message-Id: <1366705929-11251-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1366705929-11251-1-git-send-email-kraxel@redhat.com> References: <1366705929-11251-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 4/4] usb-host: raise libusbx minimum version to 1.0.13 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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 --- configure | 2 +- hw/usb/host-libusb.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/configure b/configure index 51a6c56..33d3354 100755 --- 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) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 29f35b3..d1186b8 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -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) -- 1.7.9.7