libusb: use libusb_set_option(..,LIBUSB_OPTION_LOG_LEVEL,..) instead of libusb_set_debug(..) from libusb 1.0.22+

This commit is contained in:
Matthias Ringwald 2018-06-03 20:58:39 +02:00
parent cd74063ad0
commit 6483160777

View File

@ -67,6 +67,14 @@
#include "hci.h"
#include "hci_transport.h"
// deal with changes in libusb API:
#ifdef LIBUSB_API_VERSION
#if LIBUSB_API_VERSION >= 0x01000106
// since 1.0.22, libusb_set_option replaces libusb_set_debug
#define libusb_set_debug(context,level) libusb_set_option(context, LIBUSB_OPTION_LOG_LEVEL, level)
#endif
#endif
#if (USB_VENDOR_ID != 0) && (USB_PRODUCT_ID != 0)
#define HAVE_USB_VENDOR_ID_AND_PRODUCT_ID
#endif