+/*
+ * [XSI] Inclusion of the <aio.h> header may make visible symbols defined
+ * in the headers <fcntl.h>, <signal.h>, <sys/types.h>, and <time.h>.
+ *
+ * In our case, this is limited to struct timespec, off_t and ssize_t.
+ */
+#define __need_struct_timespec
+#ifdef KERNEL
+#define __need_struct_user64_timespec
+#define __need_struct_user32_timespec
+#endif /* KERNEL */
+#include <sys/_structs.h>
+
+#ifndef _OFF_T
+typedef __darwin_off_t off_t;
+#define _OFF_T
+#endif
+
+#ifndef _SSIZE_T
+#define _SSIZE_T
+typedef __darwin_ssize_t ssize_t;
+#endif
+
+/*
+ * A aio_fsync() options that the calling thread is to continue execution
+ * while the lio_listio() operation is being performed, and no notification
+ * is given when the operation is complete
+ *
+ * [XSI] from <fcntl.h>
+ */
+#ifndef O_SYNC /* allow simultaneous inclusion of <fcntl.h> */
+#define O_SYNC 0x0080 /* synch I/O file integrity */
+#endif
+
+#ifndef O_DSYNC /* allow simultaneous inclusion of <fcntl.h> */
+#define O_DSYNC 0x400000 /* synch I/O data integrity */
+#endif
+
+