From 0cbc3a409bcb45cefb3edbf144d64ddd4e0821ce Mon Sep 17 00:00:00 2001 From: Tobias Rehbein Date: Sat, 14 Dec 2013 09:04:11 +0100 Subject: [PATCH] libusb: Adapt to FreeBSD 10 FreeBSD 10 has libusb_get_string_descriptor() in base libusb, so don't define it here. --- libusb/hid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libusb/hid.c b/libusb/hid.c index 65be56e..a23bf46 100644 --- a/libusb/hid.c +++ b/libusb/hid.c @@ -313,9 +313,9 @@ static int get_usage(uint8_t *report_descriptor, size_t size, } #endif /* INVASIVE_GET_USAGE */ -#ifdef __FreeBSD__ -/* 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 +#if defined(__FreeBSD__) && __FreeBSD__ < 10 +/* The libusb version included in FreeBSD < 10 doesn't have this function. 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. Note that the data parameter is Unicode in UTF-16LE encoding.