diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/usbhid-dump.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 00cfd50..3422710 100644 --- a/configure.ac +++ b/configure.ac @@ -88,7 +88,7 @@ fi # # Checks for library functions. # -AC_CHECK_FUNCS(libusb_strerror) +AC_CHECK_FUNCS([libusb_strerror libusb_set_option]) # # Output diff --git a/src/usbhid-dump.c b/src/usbhid-dump.c index b10423a..7f5d962 100644 --- a/src/usbhid-dump.c +++ b/src/usbhid-dump.c @@ -527,7 +527,11 @@ run(bool dump_descriptor, LIBUSB_GUARD(libusb_init(&ctx), "create libusb context"); /* Set libusb debug level to informational only */ +#if HAVE_LIBUSB_SET_OPTION libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO); +#else + libusb_set_debug(ctx, LIBUSB_LOG_LEVEL_INFO); +#endif /* Open device list */ LIBUSB_GUARD(uhd_dev_list_open(ctx, bus_num, dev_addr, |