diff --git a/clang/lib/Headers/float.h b/clang/lib/Headers/float.h index c6a6cc08462d..d02531c466f4 100644 --- a/clang/lib/Headers/float.h +++ b/clang/lib/Headers/float.h @@ -17,9 +17,13 @@ * Also fall back on Darwin and AIX to allow additional definitions and * implementation-defined values. */ -#if (defined(__APPLE__) || defined(__MINGW32__) || defined(_MSC_VER) || \ - defined(_AIX)) && \ - __STDC_HOSTED__ && __has_include_next() +#if defined(__APPLE__) && __has_include() +#include +#endif +#if ((defined(__APPLE__) && __has_include() && (!defined(__MAC_OS_X_VERSION_MAX_ALLOWED) || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300)) || \ + defined(__MINGW32__) || defined(_MSC_VER) || \ + defined(_AIX)) && \ + __STDC_HOSTED__ && __has_include_next() /* Prior to Apple's 10.7 SDK, float.h SDK header used to apply an extra level * of #include_next to keep Metrowerks compilers happy. Avoid this