From 79908e1109e6de0e8703629a95041cc504aa2a6d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 3 Jun 2018 16:23:41 +0200 Subject: libusb-1.0.22 deprecated libusb_set_debug() with libusb_set_option() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids the following compiler warnings when using more recent versions of libusb: src/libosmo-fl2k.c:384:2: warning: ‘libusb_set_debug’ is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations] libusb_set_debug(dev->ctx, 3); ^~~~~~~~~~~~~~~~ Details can be found at https://github.com/libusb/libusb/commit/539f22e2fd916558d11ab9a66f10f461c5593168 --- src/libosmo-fl2k.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libosmo-fl2k.c b/src/libosmo-fl2k.c index 0285f9a..9116aff 100644 --- a/src/libosmo-fl2k.c +++ b/src/libosmo-fl2k.c @@ -381,7 +381,11 @@ int fl2k_open(fl2k_dev_t **out_dev, uint32_t index) return -1; } +#if LIBUSB_API_VERSION >= 0x01000106 + libusb_set_option(dev->ctx, LIBUSB_OPTION_LOG_LEVEL, 3); +#else libusb_set_debug(dev->ctx, 3); +#endif dev->dev_lost = 1; -- cgit v1.2.3