Cocoa: Fix deprecation of kIOMasterPortDefault

This adds a workaround for kIOMasterPortDefault having been deprecated
in favor of kIOMainPortDefault in macOS 12.0.

Closes #1980

(cherry picked from commit f75c251dec)
This commit is contained in:
Josh Codd
2021-10-26 00:14:30 +01:00
committed by Camilla Löwy
parent 85f37ada6d
commit 472d45c07b
2 changed files with 9 additions and 2 deletions
+7
View File
@@ -41,6 +41,13 @@
typedef void* id;
#endif
// NOTE: Many Cocoa enum values have been renamed and we need to build across
// SDK versions where one is unavailable or the other deprecated
// We use the newer names in code and these macros to handle compatibility
#if MAC_OS_X_VERSION_MAX_ALLOWED < 120000
#define kIOMainPortDefault kIOMasterPortDefault
#endif
// NOTE: Many Cocoa enum values have been renamed and we need to build across
// SDK versions where one is unavailable or the other deprecated
// We use the newer names in code and these macros to handle compatibility