Add workaround for unguarded use of __has_extension

This commit is contained in:
morinmorin 2024-03-13 02:10:03 +09:00 committed by Martin Hořeňovský
parent 88f4ec3cc5
commit eb8f2c5810

View File

@ -11,6 +11,9 @@
// See e.g.: // See e.g.:
// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html // https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html
#ifdef __APPLE__ #ifdef __APPLE__
# ifndef __has_extension
# define __has_extension(x) 0
# endif
# include <TargetConditionals.h> # include <TargetConditionals.h>
# if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \ # if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \
(defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1) (defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1)