]> sigrok.org Git - libsigrok.git/blobdiff - libsigrok-internal.h
Fix two FreeBSD build issues related to libusb-1.0.
[libsigrok.git] / libsigrok-internal.h
index a2d9a5a19dbf7c6d7db688b01ad030e25a4e31f2..95978b2094dba7ce3e54809fe070266a0a640db8 100644 (file)
 #define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a)
 #endif
 
+/* Portability fixes for FreeBSD. */
+#ifdef __FreeBSD__
+#define LIBUSB_CLASS_APPLICATION 0xfe
+#define libusb_handle_events_timeout_completed(ctx, tv, c) \
+       libusb_handle_events_timeout(ctx, tv)
+#endif
+
 struct sr_context {
 #ifdef HAVE_LIBUSB_1_0
        libusb_context *libusb_ctx;