From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkbLx-0005C8-VY for qemu-devel@nongnu.org; Thu, 06 Jun 2013 10:39:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkbLo-0000OI-6W for qemu-devel@nongnu.org; Thu, 06 Jun 2013 10:39:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkbLn-0000Ny-Vh for qemu-devel@nongnu.org; Thu, 06 Jun 2013 10:39:40 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r56EddLB022774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Jun 2013 10:39:39 -0400 From: Hans de Goede Date: Thu, 6 Jun 2013 16:39:34 +0200 Message-Id: <1370529574-31069-3-git-send-email-hdegoede@redhat.com> In-Reply-To: <1370529574-31069-1-git-send-email-hdegoede@redhat.com> References: <1370529574-31069-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] usb/host-libusb: Fix building with libusb git master code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org 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 --- 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.8.2.1