From patchwork Mon Jul 23 20:16:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 10540937 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C84A614BC for ; Mon, 23 Jul 2018 20:45:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B87D3284FC for ; Mon, 23 Jul 2018 20:45:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC894284A3; Mon, 23 Jul 2018 20:45:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3A9D3284D1 for ; Mon, 23 Jul 2018 20:45:02 +0000 (UTC) Received: from localhost ([::1]:36487 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhhhV-0007sK-3X for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Jul 2018 16:45:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhhJ3-0002En-Bi for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:19:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhhJ2-0003j8-2T for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:19:45 -0400 Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:39343) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhhJ1-0003ie-St; Mon, 23 Jul 2018 16:19:43 -0400 Received: by mail-oi0-x22c.google.com with SMTP id d189-v6so3478804oib.6; Mon, 23 Jul 2018 13:19:43 -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=XCCrlfTWNTuOZ25P6NOioPcefqwH8d/8KKuPNtmSMek=; b=KFgDTlG1SS4lMeMUr6tqAwEGwdAUpw1WLoTlvgU04QBXDgJfOxpULCMw4mIooEZYDf PNWoJO8E96j+4lHM8XqM2ZkeX/KxGjNtY0O9SvM6Rq/mQBUjYa6tvL2DLYl4taai5gz2 IuQAeqobOxVXwTvSsd23SQh4hw8df8lDbPmG4TvunwZeERGjlAHTxfZimqx/HiCuV2KZ EtkSE0JTSswCccKW0LUS5vTk9GdVNtX3Os0jROybpKgFOvXBptcMrdn+7sF4tg3DGNAQ WNrI03qZVx15R3nKxUZ3aQOlXncKbUqXLYjBYxITNXhV+6B435dQjD3sFtUFiMhORkHr BsRw== 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=XCCrlfTWNTuOZ25P6NOioPcefqwH8d/8KKuPNtmSMek=; b=PTHakTdKDt30YmU8uNzFmYyOmDKLW4D0QBO0+OvB45G4rFN71bB/T6+lL+wA6NZqoY S2to0AaC2yGegngvdZ9IBsL3qinFuTMc70TjgbTHi+WL36BQ7SnYOF+tPMrWzdla1Sn2 WoetSpgD5i/3tHA6BYLo/JUWqYYXcfgfXlQinYwziemZBfPrJnEVCFdwnY83f19zy/xi yuu367dZRb3J+Ck1XcxwfDZjF9Mhp9eA8QHblHMFptdWeDod3BJU5wddLMRkwQrDiAFi jPwBFB/TQfRUwugNPUhcilCz8qlhB6ZvxL4A8e+0TxpkDXpVHNF0/9vA0PqDdREWyhnk YPzg== X-Gm-Message-State: AOUpUlG1kPWHqMdcA46zLYZi5RL84E4Hch+IReazExLHoHbf0lrwU/zO HF2rKzp/CCRoRB3B/qXhuP6cqnqoWr8= X-Google-Smtp-Source: AAOMgpee9RyDPrV+rwK+FWX/C+jIZTIB/y7j5n56Y1pylYSKA24zX5sdKVOzUJoXUnP2ACSn0JK+UQ== X-Received: by 2002:aca:5bd5:: with SMTP id p204-v6mr299775oib.91.1532377182665; Mon, 23 Jul 2018 13:19:42 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id q63-v6sm1771426oia.54.2018.07.23.13.19.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:19:41 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:16:44 -0500 Message-Id: <20180723201748.25573-36-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-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:c06::22c Subject: [Qemu-devel] [PATCH 35/99] 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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