Files
haikuports/dev-libs/libusb/patches/libusb-1.0.21.patchset
Adrien Destugues 300daee50f libusb: fix a crash with picolcd driver.
The implementation of libusb is not complete, and the missing functions
can lead to crashes. At least stub out this one, which is enough to get
the picolcd working.
2017-07-14 14:53:07 +02:00

38 lines
1.1 KiB
Plaintext

From 6272b5474073c90978488ec441270ed3511c09b4 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 14 Jul 2017 14:51:19 +0200
Subject: Add a stub for clear_halt.
Fixes a crash in picolcd driver.
diff --git a/libusb/os/haiku_usb_raw.cpp b/libusb/os/haiku_usb_raw.cpp
index 77adbd1..44bf4c3 100644
--- a/libusb/os/haiku_usb_raw.cpp
+++ b/libusb/os/haiku_usb_raw.cpp
@@ -128,6 +128,13 @@ haiku_set_altsetting(struct libusb_device_handle *dev_handle, int interface_numb
}
static int
+haiku_clear_halt(libusb_device_handle*, unsigned char)
+{
+ /* TODO */
+ return 0;
+}
+
+static int
haiku_release_interface(struct libusb_device_handle *dev_handle, int interface_number)
{
USBDeviceHandle *handle = *((USBDeviceHandle **)dev_handle->os_priv);
@@ -216,7 +223,7 @@ const struct usbi_os_backend haiku_usb_raw_backend = {
/*.release_interface =*/ haiku_release_interface,
/*.set_interface_altsetting =*/ haiku_set_altsetting,
- /*.clear_halt =*/ NULL,
+ /*.clear_halt =*/ haiku_clear_halt,
/*.reset_device =*/ NULL,
/*.alloc_streams =*/ NULL,
--
2.7.0