diff options
author | bunnei <bunneidev@gmail.com> | 2016-12-16 06:40:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-16 06:40:40 +0100 |
commit | a89471621b3b156300700f29ebed601da9b582a5 (patch) | |
tree | 98d47d481d24566575c88d40836123e899782975 | |
parent | Merge pull request #2328 from wwylele/fix-trace (diff) | |
parent | Common: Fix gcc build on macOS (diff) | |
download | yuzu-a89471621b3b156300700f29ebed601da9b582a5.tar yuzu-a89471621b3b156300700f29ebed601da9b582a5.tar.gz yuzu-a89471621b3b156300700f29ebed601da9b582a5.tar.bz2 yuzu-a89471621b3b156300700f29ebed601da9b582a5.tar.lz yuzu-a89471621b3b156300700f29ebed601da9b582a5.tar.xz yuzu-a89471621b3b156300700f29ebed601da9b582a5.tar.zst yuzu-a89471621b3b156300700f29ebed601da9b582a5.zip |
-rw-r--r-- | src/common/file_util.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index b6161f2dc..c618495f7 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp @@ -40,9 +40,20 @@ #endif #if defined(__APPLE__) +// CFURL contains __attribute__ directives that gcc does not know how to parse, so we need to just +// ignore them if we're not using clang. The macro is only used to prevent linking against +// functions that don't exist on older versions of macOS, and the worst case scenario is a linker +// error, so this is perfectly safe, just inconvenient. +#ifndef __clang__ +#define availability(...) +#endif #include <CoreFoundation/CFBundle.h> #include <CoreFoundation/CFString.h> #include <CoreFoundation/CFURL.h> +#ifdef availability +#undef availability +#endif + #endif #include <algorithm> |