Make asctime_r work for HP/UX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19544 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/System/Unix/TimeValue.inc b/lib/System/Unix/TimeValue.inc
index 8f0ad38..83d76d2 100644
--- a/lib/System/Unix/TimeValue.inc
+++ b/lib/System/Unix/TimeValue.inc
@@ -25,7 +25,11 @@
char buffer[32];
time_t ourTime = time_t(this->toEpochTime());
+#ifdef __hpux
+ asctime_r(localtime(&ourTime), buffer);
+#else
::asctime_r(::localtime(&ourTime), buffer);
+#endif
std::string result(buffer);
return result.substr(0,24);