summaryrefslogtreecommitdiff
path: root/src/base/time.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/time.cc')
-rw-r--r--src/base/time.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/base/time.cc b/src/base/time.cc
index cbc7256ee..76ba355b7 100644
--- a/src/base/time.cc
+++ b/src/base/time.cc
@@ -105,7 +105,11 @@ Time::date(string format) const
char buf[256];
if (format.empty()) {
+#ifdef __SUNPRO_CC
+ ctime_r(&sec, buf, 256);
+#else
ctime_r(&sec, buf);
+#endif
buf[24] = '\0';
return buf;
}