aboutsummaryrefslogtreecommitdiff
path: root/lib/libusb/libusb10.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libusb/libusb10.c')
-rw-r--r--lib/libusb/libusb10.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c
index 256d67e93bc5..021229669119 100644
--- a/lib/libusb/libusb10.c
+++ b/lib/libusb/libusb10.c
@@ -25,17 +25,23 @@
* SUCH DAMAGE.
*/
-#include <sys/fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/queue.h>
-
+#ifdef LIBUSB_GLOBAL_INCLUDE_FILE
+#include LIBUSB_GLOBAL_INCLUDE_FILE
+#else
#include <assert.h>
#include <errno.h>
#include <poll.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
+#include <time.h>
+#include <sys/fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/queue.h>
+#include <sys/endian.h>
+#endif
#define libusb_device_handle libusb20_device
@@ -1331,7 +1337,7 @@ failure:
/* make sure our event loop spins the done handler */
dummy = 0;
- write(dev->ctx->ctrl_pipe[1], &dummy, sizeof(dummy));
+ err = write(dev->ctx->ctrl_pipe[1], &dummy, sizeof(dummy));
}
/* The following function must be called unlocked */