diff --git a/libcxx/include/__configuration/platform.h b/libcxx/include/__configuration/platform.h index f3c199dee172b..25e2cf4d3edd2 100644 --- a/libcxx/include/__configuration/platform.h +++ b/libcxx/include/__configuration/platform.h @@ -45,7 +45,9 @@ // This is required in order for _NEWLIB_VERSION to be defined in places where we use it. // TODO: We shouldn't be including arbitrarily-named headers from libc++ since this can break valid // user code. Move code paths that need _NEWLIB_VERSION to another customization mechanism. -#if __has_include() +#if __has_include(<_newlib_version.h>) +# include <_newlib_version.h> +#elif __has_include() # include #endif