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.
This commit is contained in:
1 parent
4a4005b46d
commit
57b0c6d0c4
1 file changed
+3
-1
+3
-1
@@ -25,7 +25,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <dlfcn.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) {
|
static char to_ascii(char c) {
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user