system_error: use strerror_r only for threaded code
When building libc++ without threading, strerror_r is not used. Define
the code only when threading is enabled. This allows us to build
system_error for Windows, which ATM doesn't build with threading.
llvm-svn: 290791
diff --git a/libcxx/src/system_error.cpp b/libcxx/src/system_error.cpp
index 926f6f1..3a22554 100644
--- a/libcxx/src/system_error.cpp
+++ b/libcxx/src/system_error.cpp
@@ -55,6 +55,7 @@
return *this == code.category() && code.value() == condition;
}
+#if !defined(_LIBCPP_HAS_NO_THREADS)
namespace {
// GLIBC also uses 1024 as the maximum buffer size internally.
@@ -96,6 +97,7 @@
#endif
} // end namespace
+#endif
string
__do_message::message(int ev) const