diff --git a/libcxx/include/__undef_min_max b/libcxx/include/__undef_min_max index 88bc53feaaf8..b1e80d1b0499 100644 --- a/libcxx/include/__undef_min_max +++ b/libcxx/include/__undef_min_max @@ -9,11 +9,11 @@ //===----------------------------------------------------------------------===// #ifdef min -#warning: macro min is incompatible with C++. #undef'ing min +#warning: macro min is incompatible with C++. #undefing min #undef min #endif #ifdef max -#warning: macro max is incompatible with C++. #undef'ing max +#warning: macro max is incompatible with C++. #undefing max #undef max #endif diff --git a/libcxx/src/stdexcept.cpp b/libcxx/src/stdexcept.cpp index 5f4d6b52a4de..660ebfe27355 100644 --- a/libcxx/src/stdexcept.cpp +++ b/libcxx/src/stdexcept.cpp @@ -16,8 +16,13 @@ #include #include "system_error" -// Use to determine whether we're linking against libc++abi. -#if __has_include() +#ifndef __has_include +#define __has_include(inc) 0 +#endif + +#if __APPLE__ +#include +#elif defined(LIBCXXRT) || __has_include() #include #endif