From 6f0cbda48c999fa608ea4f120ee5c370d004ed56 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 26 Nov 2023 12:21:09 +0100 Subject: [PATCH] Fix mingw VST3 build (atomic add) Signed-off-by: falkTX --- .../format_types/VST3_SDK/pluginterfaces/base/funknown.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/funknown.cpp b/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/funknown.cpp index 206a64afcf..aa6196934c 100644 --- a/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/funknown.cpp +++ b/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/funknown.cpp @@ -67,11 +67,11 @@ namespace FUnknownPrivate { //------------------------------------------------------------------------ int32 PLUGIN_API atomicAdd (int32& var, int32 d) { -#if SMTG_OS_WINDOWS +#if SMTG_OS_WINDOWS && !defined(__MINGW32__) return InterlockedExchangeAdd (&var, d) + d; #elif SMTG_OS_MACOS return OSAtomicAdd32Barrier (d, (int32_t*)&var); -#elif SMTG_OS_LINUX +#elif SMTG_OS_LINUX || defined(__MINGW32__) __gnu_cxx::__atomic_add (&var, d); return var; #else