mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
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.
This commit is contained in:
@@ -20,9 +20,10 @@ COPYRIGHT="2001 Johannes Erdfelt
|
||||
2012-2013 Toby Gray
|
||||
2013-2015 Chris Dickens"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="2"
|
||||
REVISION="3"
|
||||
SOURCE_URI="https://github.com/libusb/libusb/archive/v$portVersion.tar.gz"
|
||||
SOURCE_FILENAME="libusb-$portVersion.tar.gz"
|
||||
PATCHES="libusb-$portVersion.patchset"
|
||||
CHECKSUM_SHA256="1a5b08c05bc5e38c81c2d59c29954d5916646f4ff46f51381b3f624384e4ac01"
|
||||
ARCHITECTURES="x86 x86_64 x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
37
dev-libs/libusb/patches/libusb-1.0.21.patchset
Normal file
37
dev-libs/libusb/patches/libusb-1.0.21.patchset
Normal file
@@ -0,0 +1,37 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user