From 7d4e299e4397fcdf7cf307c97897678550e60c00 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 4 May 2022 16:36:33 +0200 Subject: [PATCH] Fix compat with old macOS --- distrho/extra/FileBrowserDialog.cpp | 5 +++++ distrho/src/DistrhoDefines.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/distrho/extra/FileBrowserDialog.cpp b/distrho/extra/FileBrowserDialog.cpp index 195b4a8a..df109341 100644 --- a/distrho/extra/FileBrowserDialog.cpp +++ b/distrho/extra/FileBrowserDialog.cpp @@ -303,6 +303,10 @@ FileBrowserHandle fileBrowserCreate(const bool isEmbed, ScopedPointer handle(new FileBrowserData(options.saving)); #ifdef DISTRHO_OS_MAC +# if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_8 + // unsupported + return nullptr; +# else NSSavePanel* const nsBasePanel = handle->nsBasePanel; DISTRHO_SAFE_ASSERT_RETURN(nsBasePanel != nullptr, nullptr); @@ -349,6 +353,7 @@ FileBrowserHandle fileBrowserCreate(const bool isEmbed, } }]; }); +# endif #endif #ifdef DISTRHO_OS_WINDOWS diff --git a/distrho/src/DistrhoDefines.h b/distrho/src/DistrhoDefines.h index 929593c2..94c6a2a4 100644 --- a/distrho/src/DistrhoDefines.h +++ b/distrho/src/DistrhoDefines.h @@ -90,9 +90,9 @@ #endif /* Define DISTRHO_DEPRECATED_BY */ -#if defined(__clang__) && defined(DISTRHO_PROPER_CPP11_SUPPORT) +#if defined(__clang__) && (__clang_major__ * 100 + __clang_minor__) >= 502 # define DISTRHO_DEPRECATED_BY(other) __attribute__((deprecated("", other))) -#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 480 +#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 # define DISTRHO_DEPRECATED_BY(other) __attribute__((deprecated("Use " other))) #else # define DISTRHO_DEPRECATED_BY(other) DISTRHO_DEPRECATED