components/libusb-1/patches/03-sparcv9_alignment.patch
author Ivo Raisr <ivo.raisr@oracle.com>
Sun, 26 Jun 2016 22:14:47 -0700
changeset 6321 21695cc5d3c7
permissions -rw-r--r--
23698082 invalid alignment of "os_priv" in libusb-1 results in SIGBUS

Fix alignment of "os_priv" attribute in structures
libusb_device and libusb_device_handle on Solaris sparcv9.

--- libusb-1.0.20/libusb/libusbi.h.orig	Sat Jun 25 20:45:07 2016
+++ libusb-1.0.20/libusb/libusbi.h	Sat Jun 25 20:45:34 2016
@@ -353,6 +353,9 @@
 #else
 	[0] /* non-standard, but usually working code */
 #endif
+#if defined(OS_SUNOS)
+	__attribute__((aligned(8)))
+#endif
 	;
 };
 
@@ -370,6 +373,9 @@
 #else
 	[0] /* non-standard, but usually working code */
 #endif
+#if defined(OS_SUNOS)
+        __attribute__((aligned(8)))
+#endif 
 	;
 };