aboutsummaryrefslogtreecommitdiff
path: root/lib/libusb/libusb_global_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libusb/libusb_global_linux.h')
-rw-r--r--lib/libusb/libusb_global_linux.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libusb/libusb_global_linux.h b/lib/libusb/libusb_global_linux.h
index cbdd2c6b818d..13d344a92ea0 100644
--- a/lib/libusb/libusb_global_linux.h
+++ b/lib/libusb/libusb_global_linux.h
@@ -29,7 +29,9 @@
#define _XOPEN_SOURCE
#define _BSD_SOURCE
+#ifdef __linux__
#define _POSIX_SOURCE
+#endif
#define _POSIX_C_SOURCE 200809
#include <ctype.h>
@@ -39,10 +41,13 @@
#include <stdint.h>
#include <time.h>
#include <unistd.h>
+#ifdef __linux__
#include <alloca.h>
+#endif
#include <string.h>
#include <fcntl.h>
#include <limits.h>
+#include <setjmp.h>
#include <pthread.h>
#include <sys/queue.h>
#include <sys/ioctl.h>
@@ -51,6 +56,10 @@
#include <dev/usb/usb_endian.h>
#include <dev/usb/usb_freebsd.h>
+#include <compat/linux/linux_ioctl.h>
+
+#define IOUSB(a) FBSD_L##a
+
#ifndef __aligned
#define __aligned(x) __attribute__((__aligned__(x)))
#endif