From: Keith Packard Date: Wed, 2 Sep 2020 01:31:03 +0000 (-0700) Subject: libaltos: Update to support Mac OS X 10.15 (catalina) X-Git-Tag: 1.9.5~1^2~5 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=5bdc63a2086c1ffd4c34c9a503af638a47a1d98b libaltos: Update to support Mac OS X 10.15 (catalina) They decided to break device names reported by USB for some reason, but at least the real names are still available under a different name. Also updated the Makefile-standalone to work on my current box; presumably the next time I build this I'll have to update again... Signed-off-by: Keith Packard --- diff --git a/libaltos/Makefile-standalone b/libaltos/Makefile-standalone index 1430aacb..77c7cca5 100644 --- a/libaltos/Makefile-standalone +++ b/libaltos/Makefile-standalone @@ -33,12 +33,12 @@ OS_SRCS=libaltos_posix.c libaltos_darwin.c # -iwithsysroot /System/Library/Frameworks/IOKit.framework/Headers \ # -iwithsysroot /System/Library/Frameworks/CoreFoundation.framework/Headers -XCODE=/Applications/Xcode-beta.app -SDK=$(XCODE)/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk +XCODE=/Applications/Xcode.app +SDK=$(XCODE)/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk MINVERSION=10.5 OS_LIB_CFLAGS=\ - -DDARWIN -DPOSIX_TTY -arch i386 -arch x86_64 -isysroot $(SDK) \ + -DDARWIN -DPOSIX_TTY -arch x86_64 -isysroot $(SDK) \ -mmacosx-version-min=10.5 \ -iwithsysroot /System/Library/Frameworks/JavaVM.framework/Headers \ -iwithsysroot /System/Library/Frameworks/IOKit.framework/Headers \ diff --git a/libaltos/libaltos.dylib b/libaltos/libaltos.dylib index c18493ea..0d5b9c46 100755 Binary files a/libaltos/libaltos.dylib and b/libaltos/libaltos.dylib differ diff --git a/libaltos/libaltos_darwin.c b/libaltos/libaltos_darwin.c index c6b6355f..794c0215 100644 --- a/libaltos/libaltos_darwin.c +++ b/libaltos/libaltos_darwin.c @@ -192,7 +192,8 @@ altos_list_next(struct altos_list *list, struct altos_device *device) if (get_number (usb_device, CFSTR(kUSBVendorID), &device->vendor) && get_number (usb_device, CFSTR(kUSBProductID), &device->product) && get_string (object, CFSTR(kIOCalloutDeviceKey), device->path, sizeof (device->path)) && - get_string (usb_device, CFSTR(kUSBProductString), device->name, sizeof (device->name)) && + (get_string (usb_device, CFSTR("kUSBProductString"), device->name, sizeof (device->name)) || + get_string (usb_device, CFSTR(kUSBProductString), device->name, sizeof (device->name))) && get_string (usb_device, CFSTR(kUSBSerialNumberString), serial_string, sizeof (serial_string))) { device->serial = atoi(serial_string); IOObjectRelease(object);