diff --git a/c_src/mac/keyio_mac.hpp b/c_src/mac/keyio_mac.hpp index d2cc0a45..30883457 100644 --- a/c_src/mac/keyio_mac.hpp +++ b/c_src/mac/keyio_mac.hpp @@ -6,6 +6,12 @@ #include #include #include +#include + +/* The name was changed from "Master" to "Main" in Apple SDK 12.0 (Monterey) */ +#if !defined (MAC_OS_X_VERSION_12_0) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_12_0) + #define kIOMainPortDefault kIOMasterPortDefault +#endif int init_sink(void); int exit_sink(void);