diff options
author | Nikolai Kondrashov <spbnick@gmail.com> | 2019-01-05 16:44:12 +0200 |
---|---|---|
committer | Nikolai Kondrashov <spbnick@gmail.com> | 2019-01-22 09:05:33 +0200 |
commit | 209c2b042936d0b13c9d7530e374a669f99a5564 (patch) | |
tree | c376c0ecda8da30952186d4c95e94cb9cb9607b6 | |
parent | 4dfaab4699987befd235d8f44c105bdbea385d42 (diff) | |
download | usbhid-dump-209c2b042936d0b13c9d7530e374a669f99a5564.tar.gz |
Resolves #4
-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, |