From patchwork Tue Jun 19 01:43:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 931356 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kn6X+bJ0"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 418trv4r65z9s47 for ; Tue, 19 Jun 2018 13:35:27 +1000 (AEST) Received: from localhost ([::1]:39109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV7QT-0004Jd-7x for incoming@patchwork.ozlabs.org; Mon, 18 Jun 2018 23:35:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV5kL-0003lW-VY for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:47:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fV5kL-0001Fb-0J for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:47:50 -0400 Received: from mail-ot0-x234.google.com ([2607:f8b0:4003:c0f::234]:33934) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fV5kK-0001F7-RW; Mon, 18 Jun 2018 21:47:48 -0400 Received: by mail-ot0-x234.google.com with SMTP id r18-v6so20786312otk.1; Mon, 18 Jun 2018 18:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=p5Cg4ywzQhZG0uqDz1q2Q6mj00yxQCPX3Fq4GAvT4XE=; b=kn6X+bJ0h+1RB04QmIq5BAacL/Q5XAiBmIs0aASl/CtIEtz5M3NQRHCdBJc4+4Sqmt FfpbyL7zoVYTbtzrOfJSazZHMh40Aiu9PMhT31gtiYBV0Y/pLLcx0TSrJmh+wd2KkIsP 8JkJW8ayQHYPWKj/ok5DRLYBh0nnTJvlX3I71hmTDGWqxoZTEgQUmT798GOgW2yl/Vhi AsBhkuWXY0kcMD/pspoIFAu+vHFKfKOJqEExPGlmeARgFYAWNSCDMcS4V3tLhqjUyr9I 0e1vny60NOjxqF3BshtZ+0Y0KiKrlluzIaEZW+UFergPKYQXpAMTYgdCrh02PwDIoOzb VDEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=p5Cg4ywzQhZG0uqDz1q2Q6mj00yxQCPX3Fq4GAvT4XE=; b=io5oFB8iw2jJjiYBE34ZsjCfHRhSj7Bx/thvq8lztc0i8pskIpcC71xjBPz08Bt/a9 R9MtuilG9DJHI+ZqdXA8h9aKP11m/NUrdWRsrJEM5ItUAjVDu5JsfXj+x6uBg1AfYV3U U1+YX1fzoQqugaB3AWKWKBUpIZbK4MLZYKF2sz34QChfPXLBjY1erndCkJiWMnFLrh7i ad/+o92j9iz5iUPn3lwYj9pmxQ0RHhYUkj3HiS3DAYTI+obnfduG2Qa4SUw52AHBG/Gq 3BwQvJseoE+FyEZc4O4He6YvRlmLAP0wd7zbAFebjjhu3XRhLYknLG7dAKc9FKVcMpPw SxBw== X-Gm-Message-State: APt69E1Afe4/lf3CR50orMbTttNwQBTpDoGpWl3DhdaxiuC8m02F0Pqv 4rOfMOWHjWyPQOmt5q9HU4DxrKorHKc= X-Google-Smtp-Source: ADUXVKJ2UfNHW2R6PQ25RgBTGAYgefMSXoX3rRVFK7AqVJnDUZTRqjBfkgCDfIPkpSb0kQRF5/QFcw== X-Received: by 2002:a9d:2b3c:: with SMTP id o57-v6mr9857983otb.312.1529372867567; Mon, 18 Jun 2018 18:47:47 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id v66-v6sm8217380ota.65.2018.06.18.18.47.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 18:47:46 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 18 Jun 2018 20:43:04 -0500 Message-Id: <20180619014319.28272-99-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> References: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c0f::234 Subject: [Qemu-devel] [PATCH 098/113] Fix libusb-1.0.22 deprecated libusb_set_debug with libusb_set_option X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-stable@nongnu.org, John Thomson , Gerd Hoffmann Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: John Thomson libusb-1.0.22 marked libusb_set_debug deprecated it is replaced with libusb_set_option(libusb_context, LIBUSB_OPTION_LOG_LEVEL, libusb_log_level); details here: https://github.com/libusb/libusb/commit/539f22e2fd916558d11ab9a66f10f461c5593168 Warning here: CC hw/usb/host-libusb.o /builds/xen/src/qemu-xen/hw/usb/host-libusb.c: In function 'usb_host_init': /builds/xen/src/qemu-xen/hw/usb/host-libusb.c:250:5: error: 'libusb_set_debug' is deprecated: Use libusb_set_option instead [-Werror=deprecated-declarations] libusb_set_debug(ctx, loglevel); ^~~~~~~~~~~~~~~~ In file included from /builds/xen/src/qemu-xen/hw/usb/host-libusb.c:40:0: /usr/include/libusb-1.0/libusb.h:1300:18: note: declared here void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level); ^~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [/builds/xen/src/qemu-xen/rules.mak:66: hw/usb/host-libusb.o] Error 1 make: Leaving directory '/builds/xen/src/xen/tools/qemu-xen-build' Signed-off-by: John Thomson Message-id: 20180405132046.4968-1-git@johnthomson.fastmail.com.au Signed-off-by: Gerd Hoffmann (cherry picked from commit 9d8fa0df49af16a208fa961c2968fba4daffcc07) Signed-off-by: Michael Roth --- 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 1b0be071cc..dc0a8fe295 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -247,7 +247,11 @@ static int usb_host_init(void) if (rc != 0) { return -1; } +#if LIBUSB_API_VERSION >= 0x01000106 + libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, loglevel); +#else libusb_set_debug(ctx, loglevel); +#endif #ifdef CONFIG_WIN32 /* FIXME: add support for Windows. */ #else