From e5cc456bc6446501bcb571cbb9788b7d357d0c19 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 11 Dec 2021 08:43:36 -0500
Subject: [PATCH] Fix macOS 12.0 SDK deprecation

---
 indra/newview/llappviewermacosx.cpp | 2 +-
 indra/newview/llmachineid.cpp       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 9a00bdf4819..045bc2dbf3f 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -394,7 +394,7 @@ std::string LLAppViewerMacOSX::generateSerialNumber()
 
 	// JC: Sample code from http://developer.apple.com/technotes/tn/tn1103.html
 	CFStringRef serialNumber = NULL;
-	io_service_t    platformExpert = IOServiceGetMatchingService(kIOMasterPortDefault,
+    io_service_t    platformExpert = IOServiceGetMatchingService(kIOMainPortDefault,
 																 IOServiceMatching("IOPlatformExpertDevice"));
 	if (platformExpert)
     {
diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp
index c3b193876eb..eebe8ae80c9 100644
--- a/indra/newview/llmachineid.cpp
+++ b/indra/newview/llmachineid.cpp
@@ -350,7 +350,7 @@ bool LLWMIMethods::getGenericSerialNumber(const BSTR &select, const LPCWSTR &var
 bool getSerialNumber(unsigned char *unique_id, size_t len)
 {
     CFStringRef serial_cf_str = NULL;
-    io_service_t platformExpert = IOServiceGetMatchingService(kIOMasterPortDefault,
+    io_service_t platformExpert = IOServiceGetMatchingService(kIOMainPortDefault,
                                                                  IOServiceMatching("IOPlatformExpertDevice"));
     if (platformExpert)
     {
-- 
GitLab