mirror of
https://github.com/shadps4-emu/ext-libusb.git
synced 2026-01-31 00:55:21 +01:00
a8fba21b7fa38860d78b131ca72937792adb9d62
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, as detected by tests/set_option. Therefore change the libusb_init_option struct to use int here as well. Thanks to Aurelien Jarno for reporting and initial patch. Closes #1416 Closes #1436 Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
libusb
libusb is a library for USB device access from Linux, macOS, Windows, OpenBSD/NetBSD, Haiku, Solaris userspace, and WebAssembly via WebUSB. It is written in C (Haiku backend in C++) and licensed under the GNU Lesser General Public License version 2.1 or, at your option, any later version (see COPYING).
libusb is abstracted internally in such a way that it can hopefully be ported to other operating systems. Please see the PORTING file for more information.
libusb homepage: http://libusb.info/
Developers will wish to consult the API documentation: http://api.libusb.info
Use the mailing list for questions, comments, etc: http://mailing-list.libusb.info
- Hans de Goede hdegoede@redhat.com
- Xiaofan Chen xiaofanc@gmail.com
- Ludovic Rousseau ludovic.rousseau@gmail.com
- Nathan Hjelm hjelmn@cs.unm.edu
- Chris Dickens christopher.a.dickens@gmail.com
(Please use the mailing list rather than mailing developers directly)
Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-31T05:30:30.373Z
Languages
C
91.5%
C++
4.8%
M4
1.3%
Makefile
1.1%
CMake
0.6%
Other
0.6%