23698082 invalid alignment of "os_priv" in libusb-1 results in SIGBUS
authorIvo Raisr <ivo.raisr@oracle.com>
Sun, 26 Jun 2016 22:14:47 -0700
changeset 6321 21695cc5d3c7
parent 6320 2f64c87c9dfd
child 6324 97f8b348537a
23698082 invalid alignment of "os_priv" in libusb-1 results in SIGBUS
components/libusb-1/patches/03-sparcv9_alignment.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libusb-1/patches/03-sparcv9_alignment.patch	Sun Jun 26 22:14:47 2016 -0700
@@ -0,0 +1,25 @@
+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 
+ 	;
+ };
+