Found during a NuttX porting effort.
But these changes are not directly relevant to NuttX.
Differential Revision: https://reviews.llvm.org/D90139
ErrorHandler<path> err("canonical", ec, &orig_p, &cwd);
path p = __do_absolute(orig_p, &cwd, ec);
-#if _POSIX_VERSION >= 200112
+#if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112
std::unique_ptr<char, decltype(&::free)>
hold(::realpath(p.c_str(), nullptr), &::free);
if (hold.get() == nullptr)
{
return _LIBCPP_GET_C_LOCALE->__ctype_toupper;
}
-#elif __NetBSD__
+#elif defined(__NetBSD__)
const short*
ctype<char>::__classic_lower_table() _NOEXCEPT
{