From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur0W9-0004wt-8N for qemu-devel@nongnu.org; Mon, 24 Jun 2013 02:44:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ur0W7-0000I9-16 for qemu-devel@nongnu.org; Mon, 24 Jun 2013 02:44:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur0W6-0000Hp-Q4 for qemu-devel@nongnu.org; Mon, 24 Jun 2013 02:44:46 -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 r5O6ik7u023819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 24 Jun 2013 02:44:46 -0400 From: Gerd Hoffmann Date: Mon, 24 Jun 2013 08:44:40 +0200 Message-Id: <1372056283-4845-7-git-send-email-kraxel@redhat.com> In-Reply-To: <1372056283-4845-1-git-send-email-kraxel@redhat.com> References: <1372056283-4845-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 6/9] usb/host-libusb: Fix building with libusb git master code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Hans de Goede , Gerd Hoffmann From: Hans de Goede 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 Signed-off-by: Gerd Hoffmann --- hw/usb/host-libusb.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 1.7.9.7