Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change libusb_init_option to fix libusb_set_option() on big-endian
libusb_set_option() is a variadic function, so the type of the arguments is not clearly defined. When called with LIBUSB_OPTION_LOG_LEVEL, the argument is read with va_arg() as an int, which matches the type used when passing constants, and also most of the internal calls and the calls in the examples. However the internal call site in libusb_init_context() passes the ival element of the libusb_init_option struct directly, which is of type int64_t. This breaks on big-endian architectures like PowerPC. Therefore change the libusb_init_option struct to use int here as well. Thanks to Aurelien Jarno for reporting and initial patch. Closes libusb#1416 Signed-off-by: Tormod Volden <[email protected]>
- Loading branch information