diff options
author | Sebastian Reichel <sre@ring0.de> | 2016-01-15 15:44:13 +0100 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2016-01-23 16:02:46 +0100 |
commit | 57b0c6d0c47d6495392161ddd9030b2a2d5c9e6c (patch) | |
tree | ecf5f48a3a394c2be513d6f75be3b03dfaecb247 /src | |
parent | 4a4005b46dceb174211d2de1764133c26f5b7128 (diff) | |
download | 0xFFFF-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/libusb-sniff.c | 4 |
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) { |