Linux: fix clear_halt implementation The ioctl expects an integer. Bug found with the assistance of Soumen Mondal
diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c index 73529dc..820100f 100644 --- a/libusb/os/linux_usbfs.c +++ b/libusb/os/linux_usbfs.c
@@ -597,7 +597,8 @@ unsigned char endpoint) { int fd = __device_handle_priv(handle)->fd; - int r = ioctl(fd, IOCTL_USBFS_CLEAR_HALT, &endpoint); + unsigned int _endpoint = endpoint; + int r = ioctl(fd, IOCTL_USBFS_CLEAR_HALT, &_endpoint); if (r) { if (errno == ENOENT) return LIBUSB_ERROR_NOT_FOUND;