summaryrefslogtreecommitdiff
path: root/src/rtl-sdr.c
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2012-04-03 19:40:50 +0200
committerSteve Markgraf <steve@steve-m.de>2012-04-03 20:18:15 +0200
commit9773ac0b833769eb5373687eb0377c28d9f4a22a (patch)
tree811ecf8c4ec19520b84d7b1711e8838ea49f00a9 /src/rtl-sdr.c
parentb38414c15adf528e45b5cf2a151c3675a5b9b9ca (diff)
define LIBUSB_CALL if not available with old libusb
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'src/rtl-sdr.c')
-rw-r--r--src/rtl-sdr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rtl-sdr.c b/src/rtl-sdr.c
index 2d03b97..0b71071 100644
--- a/src/rtl-sdr.c
+++ b/src/rtl-sdr.c
@@ -29,6 +29,16 @@
#include <libusb.h>
+/*
+ * All libusb callback functions should be marked with the LIBUSB_CALL macro
+ * to ensure that they are compiled with the same calling convention as libusb.
+ *
+ * If the macro isn't available in older libusb versions, we simply define it.
+ */
+#ifndef LIBUSB_CALL
+#define LIBUSB_CALL
+#endif
+
#include <rtl-sdr.h>
#include "tuner_e4000.h"
#include "tuner_fc0012.h"