From ad0473413edec14805e59599ff537eba0f5b8d33 Mon Sep 17 00:00:00 2001 From: Ido Yariv Date: Tue, 16 Jun 2020 23:22:31 -0400 Subject: [PATCH] darwin: Fix invalid GetPipePropertiesV3 argument GetPipePropertiesV3 seems to require that the bVersion field of the properties argument be set before calling it: "Version of the structure. Currently kUSBEndpointPropertiesVersion3. Need to set this when using this structure" Not doing so results in an invalid argument error. Closes #744 Signed-off-by: Ido Yariv Signed-off-by: Nathan Hjelm --- libusb/os/darwin_usb.c | 2 +- libusb/version_nano.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c index b1e4514..a64d67d 100644 --- a/libusb/os/darwin_usb.c +++ b/libusb/os/darwin_usb.c @@ -1775,7 +1775,7 @@ static int submit_bulk_transfer(struct usbi_transfer *itransfer) { struct darwin_interface *cInterface; #if InterfaceVersion >= 550 - IOUSBEndpointProperties pipeProperties; + IOUSBEndpointProperties pipeProperties = {.bVersion = kUSBEndpointPropertiesVersion3}; #else /* None of the values below are used in libusb for bulk transfers */ uint8_t direction, number, interval; diff --git a/libusb/version_nano.h b/libusb/version_nano.h index b8305e3..f1ac20f 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11521 +#define LIBUSB_NANO 11522 -- 2.7.4