Check if TARGET_OS_OSX is defined before evaluating its value

Solves a case where __APPLE__ is defined, but TARGET_OS_OSX isn't, causing a compile error. Happens on my OS X 10.9 setup with MacPorts Clang 16 instead of the Xcode Clang 6.
This commit is contained in:
nilFinx 2026-08-04 15:19:28 +09:00 committed by GitHub
parent fdc1152281
commit c787a390f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16225,7 +16225,7 @@ static void Platform_SetClipboardTextFn_DefaultImpl(ImGuiContext*, const char* t
::CloseClipboard();
}
#elif defined(__APPLE__) && TARGET_OS_OSX && defined(IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS)
#elif defined(__APPLE__) && defined(TARGET_OS_OSX) && TARGET_OS_OSX && defined(IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS)
#include <Carbon/Carbon.h> // Use old API to avoid need for separate .mm file
static PasteboardRef main_clipboard = 0;