Allow testlibusb to compile on < libusb-1.0.23

Generate warning for libusb-1.0.23 future requirement
https://github.com/Hamlib/Hamlib/issues/763
pull/788/head
Mike Black W9MDB 2021-08-20 10:21:10 -05:00 zatwierdzone przez Wouter van Gulik
rodzic d97eba3c70
commit 61020e950c
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -242,7 +242,8 @@ static void print_device(libusb_device *dev, libusb_device_handle *handle)
libusb_close(handle); libusb_close(handle);
} }
#ifdef __linux__ #if defined(LIBUSB_API_VERSION) && (LIBUSB_API_VERSION >= 0x01000107)
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
@ -268,6 +269,7 @@ static int test_wrapped_device(const char *device_name)
return 0; return 0;
} }
#else #else
#warning LIBUSB-1.0.23 will be required in Hamlib > 4.3
static int test_wrapped_device(const char *device_name) static int test_wrapped_device(const char *device_name)
{ {
(void)device_name; (void)device_name;