libusb (cvs development branch) fails on ARM and probably on other RISC
architectures under Linux because key structures passed from the kernel
to user space differ in the use of the packed attribute.

In particular struct usb_device_descriptor comes up as 20 bytes in user
space and as 18 bytes in the kernel on ARM.  The kernel writes it one
way, libusb reads it another, and bad stuff happens.

There may be other instances of this.

The solution with gcc and linux is easy: use __attribute__ ((packed))
precisely as it is used in the kernel.  I leave the more generic
solution as an exercise for the reader.  :-)

-ch



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to