darwin: use internal define when querying plugin interface
authorNathan Hjelm <hjelmn@me.com>
Thu, 17 Jan 2019 04:08:07 +0000 (21:08 -0700)
committerNathan Hjelm <hjelmn@me.com>
Thu, 17 Jan 2019 04:08:07 +0000 (21:08 -0700)
Apple changed the definition of kIOUSBInterfaceInterfaceID in the SDK
for macOS 10.14. This looks like it breaks support for building for
older macOS versions when running 10.14. I don't know if the change
was intentional or a mistake but in order to guarantee libusb
builds as it has in the past we can no longer rely on
kIOUSBInterfaceInterfaceID.

Closes #519

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
libusb/os/darwin_usb.c
libusb/version_nano.h

index 61a09af..71312d7 100644 (file)
@@ -1343,7 +1343,7 @@ static int darwin_claim_interface(struct libusb_device_handle *dev_handle, int i
 
   /* Do the actual claim */
   kresult = (*plugInInterface)->QueryInterface(plugInInterface,
-                                               CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID),
+                                               CFUUIDGetUUIDBytes(InterfaceInterfaceID),
                                                (LPVOID)&cInterface->interface);
   /* We no longer need the intermediate plug-in */
   /* Use release instead of IODestroyPlugInInterface to avoid stopping IOServices associated with this device */
index 6078946..169ebb2 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11340
+#define LIBUSB_NANO 11341