| Index: third_party/libusb/libusb_send_event.patch
|
| diff --git a/third_party/libusb/libusb_send_event.patch b/third_party/libusb/libusb_send_event.patch
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ba84f7b6913ad669c984b8289e65d77550a584c4
|
| --- /dev/null
|
| +++ b/third_party/libusb/libusb_send_event.patch
|
| @@ -0,0 +1,36 @@
|
| +diff --git a/third_party/libusb/src/libusb/core.c b/third_party/libusb/src/libusb/core.c
|
| +index a91c77b..5512bd8 100644
|
| +--- a/third_party/libusb/src/libusb/core.c
|
| ++++ b/third_party/libusb/src/libusb/core.c
|
| +@@ -1664,6 +1664,15 @@ void API_EXPORTED libusb_exit(struct libusb_context *ctx)
|
| + free(ctx);
|
| + }
|
| +
|
| ++/*
|
| ++ * Interrupt libusb_handle_events_timeout_completed.
|
| ++ */
|
| ++void API_EXPORTED libusb_send_event(struct libusb_context *ctx) {
|
| ++ unsigned char dummy = 1;
|
| ++ USBI_GET_CONTEXT(ctx);
|
| ++ usbi_write(ctx->ctrl_pipe[1], &dummy, sizeof(dummy));
|
| ++}
|
| ++
|
| + /** \ingroup misc
|
| + * Check if the running library has a given capability.
|
| + *
|
| +diff --git a/third_party/libusb/src/libusb/libusb.h b/third_party/libusb/src/libusb/libusb.h
|
| +index beff229..fdf0b4d 100644
|
| +--- a/third_party/libusb/src/libusb/libusb.h
|
| ++++ b/third_party/libusb/src/libusb/libusb.h
|
| +@@ -1350,6 +1350,11 @@ int LIBUSB_CALL libusb_pollfds_handle_timeouts(libusb_context *ctx);
|
| + int LIBUSB_CALL libusb_get_next_timeout(libusb_context *ctx,
|
| + struct timeval *tv);
|
| +
|
| ++/**
|
| ++ * Interrupt libusb_handle_events_timeout_completed.
|
| ++ */
|
| ++void LIBUSB_CALL libusb_send_event(struct libusb_context *ctx);
|
| ++
|
| + /** \ingroup poll
|
| + * File descriptor for polling
|
| + */
|
|
|