From c787a390f6c8cbe7b4f9d1318f28fc218c7ddc50 Mon Sep 17 00:00:00 2001 From: nilFinx Date: Tue, 4 Aug 2026 15:19:28 +0900 Subject: [PATCH] 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. --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index b1791da0e..0b8c8a01a 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -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 // Use old API to avoid need for separate .mm file static PasteboardRef main_clipboard = 0;