--- src/libANGLE/renderer/driver_utils_mac.mm.orig 2025-09-30 05:58:34.000000000 +0800 +++ src/libANGLE/renderer/driver_utils_mac.mm 2025-11-04 06:11:05.000000000 +0800 @@ -18,10 +18,34 @@ { OSVersion result; +#if defined(__MAC_10_10) && __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion]; result.majorVersion = static_cast(version.majorVersion); result.minorVersion = static_cast(version.minorVersion); result.patchVersion = static_cast(version.patchVersion); +#else + NSString *versionString = [[NSDictionary dictionaryWithContentsOfFile: + @"/System/Library/CoreServices/SystemVersion.plist"] objectForKey:@"ProductVersion"]; + + if (versionString) + { + NSArray *versionComponents = [versionString componentsSeparatedByString:@"."]; + + result.majorVersion = (versionComponents.count > 0) ? + [[versionComponents objectAtIndex:0] intValue] : 10; + result.minorVersion = (versionComponents.count > 1) ? + [[versionComponents objectAtIndex:1] intValue] : 6; + result.patchVersion = (versionComponents.count > 2) ? + [[versionComponents objectAtIndex:2] intValue] : 0; + } + else + { + // Finally, just use the minimum supported version: + result.majorVersion = 10; + result.minorVersion = 6; + result.patchVersion = 0; + } +#endif return result; }