Index: include/__config =================================================================== --- include/__config +++ include/__config @@ -167,6 +167,10 @@ // Need to detect which libc we're using if we're on Linux. #if defined(__linux__) #include +#if __libcpp_has_include() +// Needed to detect bionic libc. +#include +#endif #if !defined(__GLIBC_PREREQ) #define __GLIBC_PREREQ(a, b) 0 #endif // !defined(__GLIBC_PREREQ) @@ -409,7 +413,7 @@ #define _LIBCPP_HAS_C11_FEATURES #elif defined(__linux__) #if !defined(_LIBCPP_HAS_MUSL_LIBC) -#if __GLIBC_PREREQ(2, 15) || defined(__BIONIC__) +#if __GLIBC_PREREQ(2, 15) || (defined(__BIONIC__) && (__ANDROID_API__ >= 21)) #define _LIBCPP_HAS_QUICK_EXIT #endif #if __GLIBC_PREREQ(2, 17)