From patchwork Tue Apr 23 08:32:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 238829 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 914472C0114 for ; Tue, 23 Apr 2013 19:19:06 +1000 (EST) Received: from localhost ([::1]:44057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUYfx-0006RO-HV for incoming@patchwork.ozlabs.org; Tue, 23 Apr 2013 04:34:09 -0400 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 Received: from rincewind.home.kraxel.org (ovpn-116-29.ams2.redhat.com [10.36.116.29]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3N8WAsD019774; Tue, 23 Apr 2013 04:32:11 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 2D0D345B4A; Tue, 23 Apr 2013 10:32:10 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 4/4] usb-host: raise libusbx minimum version to 1.0.13 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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)