]> sigrok.org Git - libsigrok.git/blobdiff - src/usb.c
Build: Add configure check for libusb event-abstraction
[libsigrok.git] / src / usb.c
index 122371f6268f2008d31a48b24e61b0c94279d05d..1b22de41acdb84bca86725da2f7fbdae4dbbe4b7 100644 (file)
--- a/src/usb.c
+++ b/src/usb.c
 
 #define LOG_PREFIX "usb"
 
+#if !HAVE_LIBUSB_OS_HANDLE
+typedef int libusb_os_handle;
+#endif
+
 /**
  * Find USB devices according to a connection string.
  *
@@ -184,10 +188,6 @@ SR_PRIV void sr_usb_close(struct sr_usb_dev_inst *usb)
        sr_dbg("Closed USB device %d.%d.", usb->bus, usb->address);
 }
 
-#if (LIBUSB_API_VERSION < 0x01000104)
-typedef int libusb_os_handle;
-#endif
-
 static LIBUSB_CALL void usb_pollfd_added(libusb_os_handle fd,
                short events, void *user_data)
 {