diff options
author | Jeffrey Pfau <jeffrey@endrift.com> | 2016-12-13 18:58:50 +0100 |
---|---|---|
committer | Jeffrey Pfau <jeffrey@endrift.com> | 2016-12-13 19:20:33 +0100 |
commit | fb952c399e1ba5435e8f76a34f609be5fd64f4eb (patch) | |
tree | 3139b2d7f6592026a46cc5deea9bf224846432e1 /src/common/file_util.cpp | |
parent | Merge pull request #2166 from endrift/clang-detect (diff) | |
download | yuzu-fb952c399e1ba5435e8f76a34f609be5fd64f4eb.tar yuzu-fb952c399e1ba5435e8f76a34f609be5fd64f4eb.tar.gz yuzu-fb952c399e1ba5435e8f76a34f609be5fd64f4eb.tar.bz2 yuzu-fb952c399e1ba5435e8f76a34f609be5fd64f4eb.tar.lz yuzu-fb952c399e1ba5435e8f76a34f609be5fd64f4eb.tar.xz yuzu-fb952c399e1ba5435e8f76a34f609be5fd64f4eb.tar.zst yuzu-fb952c399e1ba5435e8f76a34f609be5fd64f4eb.zip |
Diffstat (limited to '')
-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> |