libusb.patch

From: Christian Prochaska <christian.prochaska@genode-labs.com>


---
 libusb/core.c    |    2 ++
 libusb/libusbi.h |    3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/libusb/core.c b/libusb/core.c
index 5884dcf..eae852f 100644
--- a/libusb/core.c
+++ b/libusb/core.c
@@ -58,6 +58,8 @@ const struct usbi_os_backend * const usbi_backend = &windows_backend;
 const struct usbi_os_backend * const usbi_backend = &wince_backend;
 #elif defined(OS_HAIKU)
 const struct usbi_os_backend * const usbi_backend = &haiku_usb_raw_backend;
+#elif defined(OS_GENODE)
+const struct usbi_os_backend * const usbi_backend = &genode_usb_raw_backend;
 #else
 #error "Unsupported OS"
 #endif
diff --git a/libusb/libusbi.h b/libusb/libusbi.h
index 822612e..8777ede 100644
--- a/libusb/libusbi.h
+++ b/libusb/libusbi.h
@@ -493,7 +493,7 @@ int usbi_signal_event(struct libusb_context *ctx);
 int usbi_clear_event(struct libusb_context *ctx);
 
 /* Internal abstraction for poll (needs struct usbi_transfer on Windows) */
-#if defined(OS_LINUX) || defined(OS_DARWIN) || defined(OS_OPENBSD) || defined(OS_NETBSD) || defined(OS_HAIKU)
+#if defined(OS_LINUX) || defined(OS_DARWIN) || defined(OS_OPENBSD) || defined(OS_NETBSD) || defined(OS_HAIKU) || defined(OS_GENODE)
 #include <unistd.h>
 #include "os/poll_posix.h"
 #elif defined(OS_WINDOWS) || defined(OS_WINCE)
@@ -1091,6 +1091,7 @@ extern const struct usbi_os_backend netbsd_backend;
 extern const struct usbi_os_backend windows_backend;
 extern const struct usbi_os_backend wince_backend;
 extern const struct usbi_os_backend haiku_usb_raw_backend;
+extern const struct usbi_os_backend genode_usb_raw_backend;
 
 extern struct list_head active_contexts_list;
 extern usbi_mutex_static_t active_contexts_lock;
