From patchwork Thu Jun 6 14:39:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 249436 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C68B02C0090 for ; Fri, 7 Jun 2013 00:40:31 +1000 (EST) Received: from localhost ([::1]:49567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkbMU-0005HC-Sq for incoming@patchwork.ozlabs.org; Thu, 06 Jun 2013 10:40:22 -0400 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 Received: from shalem.localdomain.com (vpn1-5-247.ams2.redhat.com [10.36.5.247]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r56EdZcO011718; Thu, 6 Jun 2013 10:39:38 -0400 From: Hans de Goede To: Gerd Hoffmann 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Hans de Goede , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 2/2] usb/host-libusb: Fix building with libusb git master code 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 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; }