From 5ad70e3f707f862c68e03bfdaafa6a9afbb3e6eb Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Fri, 9 Dec 2022 00:10:00 -0500
Subject: [PATCH] Mac hammering

---
 indra/llcommon/llsys_objc.h  |  2 +-
 indra/llcommon/llsys_objc.mm | 24 ++++--------------------
 2 files changed, 5 insertions(+), 21 deletions(-)

diff --git a/indra/llcommon/llsys_objc.h b/indra/llcommon/llsys_objc.h
index 35599a574b7..a528f2ceefc 100644
--- a/indra/llcommon/llsys_objc.h
+++ b/indra/llcommon/llsys_objc.h
@@ -28,6 +28,6 @@
 #define LL_LLSYS_OBJC_H
 
 bool LLGetDarwinOSInfo(int &major, int &minor, int &patch);
-
+const char* LLGetDarwinPreferredLanguage();
 
 #endif // LL_LLSYS_OBJC_H
diff --git a/indra/llcommon/llsys_objc.mm b/indra/llcommon/llsys_objc.mm
index 1caf12c2d12..bfede783921 100644
--- a/indra/llcommon/llsys_objc.mm
+++ b/indra/llcommon/llsys_objc.mm
@@ -35,31 +35,15 @@ static int intAtStringIndex(NSArray *array, int index)
 bool LLGetDarwinOSInfo(int &major, int &minor, int &patch)
 {
     NSOperatingSystemVersion osVersion = [[NSProcessInfo processInfo] operatingSystemVersion];
-    major = osVersion.majorVersion;
-    minor = osVersion.minorVersion;
-    patch = osVersion.patchVersion;
-    return true;
+    major = (int)osVersion.majorVersion;
+    minor = (int)osVersion.minorVersion;
+    patch = (int)osVersion.patchVersion;
+	return true;
 }
 
 const char* LLGetDarwinPreferredLanguage()
 {
 	NSString* lang = [[NSLocale preferredLanguages] objectAtIndex:0];
 	const char* ret = [lang cStringUsingEncoding:NSASCIIStringEncoding];
-                                    @"/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 ret;
 }
-- 
GitLab