Hi,
More specifically, there is a problem with calls to
libusb_cpu_to_le16(x) in libusb.h
/** \def libusb_cpu_to_le16
* \ingroup misc
* Convert a 16-bit value from host-endian to little-endian format. On
* little endian systems, this function does nothing. On big endian systems,
* the bytes are swapped.
* \param x the host-endian value to convert
* \returns the value in little-endian byte order
*/
#define libusb_cpu_to_le16(x) ({ \
union { \
uint8_t b8[2]; \
uint16_t b16; \
} _tmp; \
uint16_t _tmp2 = (uint16_t)(x); \
_tmp.b8[1] = _tmp2>> 8; \
_tmp.b8[0] = _tmp2& 0xff; \
_tmp.b16; \
})