[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 098/113] Fix libusb-1.0.22 deprecated libusb_set_deb
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 098/113] Fix libusb-1.0.22 deprecated libusb_set_debug with libusb_set_option |
Date: |
Mon, 18 Jun 2018 20:43:04 -0500 |
From: John Thomson <address@hidden>
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 <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
(cherry picked from commit 9d8fa0df49af16a208fa961c2968fba4daffcc07)
Signed-off-by: Michael Roth <address@hidden>
---
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
--
2.11.0
- [Qemu-devel] [PATCH 086/113] intel-iommu: Redefine macros to enable supporting 48 bit address width, (continued)
- [Qemu-devel] [PATCH 086/113] intel-iommu: Redefine macros to enable supporting 48 bit address width, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 089/113] intel-iommu: remove IntelIOMMUNotifierNode, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 008/113] spapr: set vsmt to MAX(8, smp_threads), Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 090/113] intel-iommu: add iommu lock, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 092/113] intel-iommu: introduce vtd_page_walk_info, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 093/113] intel-iommu: pass in address space when page walk, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 094/113] intel-iommu: trace domain id during page walk, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 091/113] intel-iommu: only do page walk for MAP notifiers, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 095/113] util: implement simple iova tree, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 097/113] arm_gicv3_kvm: increase clroffset accordingly, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 098/113] Fix libusb-1.0.22 deprecated libusb_set_debug with libusb_set_option,
Michael Roth <=
- [Qemu-devel] [PATCH 096/113] intel-iommu: rework the page walk logic, Michael Roth, 2018/06/18
- Re: [Qemu-devel] [PATCH 00/113] Patch Round-up for stable 2.11.2, freeze on 2018-06-22, Cornelia Huck, 2018/06/19
- Re: [Qemu-devel] [Qemu-stable] [PATCH 00/113] Patch Round-up for stable 2.11.2, freeze on 2018-06-22, Greg Kurz, 2018/06/19
- Re: [Qemu-devel] [PATCH 00/113] Patch Round-up for stable 2.11.2, freeze on 2018-06-22, Cole Robinson, 2018/06/19
- Re: [Qemu-devel] [PATCH 00/113] Patch Round-up for stable 2.11.2, freeze on 2018-06-22, Bruce Rogers, 2018/06/19