darwin: do not use objc_registerThreadWithCollector where deprecated
authorNathan Hjelm <hjelmn@me.com>
Thu, 8 Sep 2016 00:50:43 +0000 (18:50 -0600)
committerNathan Hjelm <hjelmn@me.com>
Thu, 8 Sep 2016 00:50:43 +0000 (18:50 -0600)
This commit updates the check around objc_registerThreadWithCollector
to enable the call only between 10.6 (introduced) and 10.8 (deprecated).

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

index ef163ff..c2b2263 100644 (file)
@@ -373,7 +373,7 @@ static void *darwin_event_thread_main (void *arg0) {
 
   /* Set this thread's name, so it can be seen in the debugger
      and crash reports. */
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 && MAC_OS_X_VERSION_MIN_REQUIRED <= 1080
   pthread_setname_np ("org.libusb.device-hotplug");
 
   /* Tell the Objective-C garbage collector about this thread.
index 2074f55..d8b7bd4 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11141
+#define LIBUSB_NANO 11142