Files
haikuports/dev-libs/libusb/patches/libusb-1.0.22.patchset

61 lines
1.6 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 c701e34..c81658f 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
return handle->SetAltSetting(interface_number, altsetting);
}
+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)
{
@@ -218,7 +225,7 @@ const struct usbi_os_backend usbi_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.16.3
From 25fd71c6bc25bd1084f7c9a623b78aba8678b127 Mon Sep 17 00:00:00 2001
From: fbrosson <fbrosson@localhost>
Date: Tue, 27 Mar 2018 11:17:19 +0000
Subject: Use the default alignment when compiling with gcc2.
diff --git a/libusb/libusbi.h b/libusb/libusbi.h
index 31d6ce9..221d2c2 100644
--- a/libusb/libusbi.h
+++ b/libusb/libusbi.h
@@ -47,7 +47,7 @@
#else
#define PTR_ALIGNED __declspec(align(4))
#endif
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && (__GNUC__ >= 3)
#define PTR_ALIGNED __attribute__((aligned(sizeof(void *))))
#else
#define PTR_ALIGNED
--
2.16.3