1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-21 01:24:21 +00:00

VST3: Fix error when building VST3 plugins

On macOS 10.15, stdatomic.h (included by the VST3 SDK) defines a macro
named atomic_thread_fence when building in C++20 mode. This macro was
trampling over a call to std::atomic_thread_fence from the C++ atomic
header, made in juce_Atomic.h.

No JUCE implementation files use the C11 atomic functions, so I think
it's safe to just undef the problematic symbol after including all the
VST3 implementation files.
This commit is contained in:
reuk 2021-10-04 16:30:54 +01:00
parent 752a676fa6
commit 832bbed8c3
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -227,3 +227,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE
#undef DEF_CLASS2
#undef DEF_CLASS_W
#undef END_FACTORY
#ifdef atomic_thread_fence
#undef atomic_thread_fence
#endif