From 1376606a432490b4a0fb06924c2f7937582b4508 Mon Sep 17 00:00:00 2001 From: Nikolai Kondrashov Date: Mon, 26 Dec 2011 15:39:19 +0200 Subject: 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. --- src/usbhid-dump.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 #include +/* 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; -- cgit v1.2.1