summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLars Næsbye Christensen <lars@naesbye.dk>2024-01-11 20:36:17 +0100
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-01-11 22:12:44 +0200
commit4a03aa089009af9130076b438192e338bc202584 (patch)
treef5a770540bec606d7157b6ff7a0dda37a741393f /indra
parentda967da9c7aa0d88f478d476e8bb059ba79ca818 (diff)
operatingSystemVersion and NSOperatingSystemVersion exis since OS X 10.10, and we require macOS 10.13+ now
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llsys_objc.mm28
1 files changed, 1 insertions, 27 deletions
diff --git a/indra/llcommon/llsys_objc.mm b/indra/llcommon/llsys_objc.mm
index 3fd85fb1c9..1393ccea50 100644
--- a/indra/llcommon/llsys_objc.mm
+++ b/indra/llcommon/llsys_objc.mm
@@ -27,38 +27,12 @@
#import "llsys_objc.h"
#import <AppKit/AppKit.h>
-static auto intAtStringIndex(NSArray *array, int index)
-{
- return [(NSString *)[array objectAtIndex:index] integerValue];
-}
-
bool LLGetDarwinOSInfo(int64_t &major, int64_t &minor, int64_t &patch)
{
- if (NSAppKitVersionNumber > NSAppKitVersionNumber10_8)
- {
NSOperatingSystemVersion osVersion = [[NSProcessInfo processInfo] operatingSystemVersion];
major = osVersion.majorVersion;
minor = osVersion.minorVersion;
patch = osVersion.patchVersion;
- }
- else
- {
- NSString* versionString = [[NSDictionary dictionaryWithContentsOfFile:
- @"/System/Library/CoreServices/SystemVersion.plist"] objectForKey:@"ProductVersion"];
- NSArray* versions = [versionString componentsSeparatedByString:@"."];
- NSUInteger count = [versions count];
- if (count > 0)
- {
- major = intAtStringIndex(versions, 0);
- if (count > 1)
- {
- minor = intAtStringIndex(versions, 1);
- if (count > 2)
- {
- patch = intAtStringIndex(versions, 2);
- }
- }
- }
- }
+
return true;
}