fixed issue 350 - FreeBSD Support

This commit is contained in:
Justin Hammond 2014-12-05 06:52:30 +00:00
parent 67725ac732
commit 7232ac5533
6 changed files with 36 additions and 1 deletions

View file

@ -61,6 +61,9 @@ extern "C" {
#ifndef __FreeBSD__
#define DETACH_KERNEL_DRIVER
#else
/* Get __FreeBSD_version */
#include <sys/param.h>
#endif
/* Uncomment to enable the retrieval of Usage and Usage Page in
@ -249,7 +252,7 @@ static int get_usage(uint8_t *report_descriptor, size_t size,
}
#endif /* INVASIVE_GET_USAGE */
#ifdef __FreeBSD__
#ifdef defined(__FreeBSD__) && __FreeBSD_version < 1000000
/* The FreeBSD version of libusb doesn't have this funciton. In mainline
libusb, it's inlined in libusb.h. This function will bear a striking
resemblence to that one, because there's about one way to code it.