From 347c0d4de477adc7c027a61e6c9a427cc1cd02d0 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Tue, 11 Jan 2022 00:24:55 +0100 Subject: [PATCH] Fix compilation on macOS 10.12 Without this commit, kitty would fail to compile on macOS 10.12 with the error "use of undeclared identifier". This problem was introduced in f7be4fab48d2e7cc7bbf9942d8a9fdbfba85b274, where some code was moved to a different file, without moving the corresponding `#define` statements. --- glfw/cocoa_window.m | 5 ----- kitty/cocoa_window.m | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 468eb9854..94c693d6e 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -32,11 +32,6 @@ #include #include -#if (MAC_OS_X_VERSION_MAX_ALLOWED < 101300) -#define NSControlStateValueOn NSOnState -#define NSControlStateValueOff NSOffState -#define NSControlStateValueMixed NSMixedState -#endif static const char* polymorphic_string_as_utf8(id string) { diff --git a/kitty/cocoa_window.m b/kitty/cocoa_window.m index 5a2d58527..d72147726 100644 --- a/kitty/cocoa_window.m +++ b/kitty/cocoa_window.m @@ -20,6 +20,11 @@ #include #include +#if (MAC_OS_X_VERSION_MAX_ALLOWED < 101300) +#define NSControlStateValueOn NSOnState +#define NSControlStateValueOff NSOffState +#define NSControlStateValueMixed NSMixedState +#endif #if (MAC_OS_X_VERSION_MAX_ALLOWED < 101200) #define NSWindowStyleMaskResizable NSResizableWindowMask #define NSEventModifierFlagOption NSAlternateKeyMask