summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2011-12-26 15:39:19 +0200
committerNikolai Kondrashov <spbnick@gmail.com>2011-12-26 16:26:58 +0200
commit1376606a432490b4a0fb06924c2f7937582b4508 (patch)
tree9fe8844aad96637dc10bde940485fda01336406c
parente7507b80ad60ba2b2f891c75538653a865f4d8b9 (diff)
downloadusbhid-dump-1376606a432490b4a0fb06924c2f7937582b4508.tar.gz
Use LIBUSB_CALL for callbacks, if present
Use LIBUSB_CALL to specify calling conventions for dump_iface_list_stream_cb, if defined. This happens with libusb > 1.0.8.
-rw-r--r--src/usbhid-dump.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/usbhid-dump.c b/src/usbhid-dump.c
index d22cc10..0f78a72 100644
--- a/src/usbhid-dump.c
+++ b/src/usbhid-dump.c
@@ -42,6 +42,11 @@
#include <getopt.h>
#include <stdio.h>
+/* Define LIBUSB_CALL for libusb <= 1.0.8 */
+#ifndef LIBUSB_CALL
+#define LIBUSB_CALL
+#endif
+
#define GENERIC_ERROR(_fmt, _args...) \
fprintf(stderr, _fmt "\n", ##_args)
@@ -193,7 +198,7 @@ dump_iface_list_descriptor(const uhd_iface *list)
}
-static void
+static void LIBUSB_CALL
dump_iface_list_stream_cb(struct libusb_transfer *transfer)
{
enum libusb_error err;