summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2016-01-15 15:44:13 +0100
committerPali Rohár <pali.rohar@gmail.com>2016-01-23 16:02:46 +0100
commit57b0c6d0c47d6495392161ddd9030b2a2d5c9e6c (patch)
treeecf5f48a3a394c2be513d6f75be3b03dfaecb247
parent4a4005b46dceb174211d2de1764133c26f5b7128 (diff)
download0xFFFF-57b0c6d0c47d6495392161ddd9030b2a2d5c9e6c.tar.bz2
libusb-sniff: avoid usb.h include
usb.h is only required for the definition of usb_dev_handle, which is never used, so it can be defined as anonymous struct instead. This has the advantage, that libusb is not required on the system compiling the library.
-rw-r--r--src/libusb-sniff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libusb-sniff.c b/src/libusb-sniff.c
index eeb6ec6..a901556 100644
--- a/src/libusb-sniff.c
+++ b/src/libusb-sniff.c
@@ -25,7 +25,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
-#include <usb.h>
+
+struct usb_dev_handle;
+typedef struct usb_dev_handle usb_dev_handle;
static char to_ascii(char c) {