* add configure detection for solaris localtime_r, it needs to know the size of the...
[citadel.git] / webcit / http_datestring.c
index 2e2bef8dafbde31c11dee9811a0a652acdb97cd9..50cfae68f8d5abfbdbbd94f1d9611bc3806cac96 100644 (file)
@@ -71,7 +71,11 @@ void tmplput_nowstr(StrBuf *Target, WCTemplputParams *TP)
        time_t now;
        
        now = time(NULL);
+#ifdef HAVE_SOLARIS_LOCALTIME_R
+       asctime_r(localtime(&now), buf, sizeof(buf));
+#else
        asctime_r(localtime(&now), buf);
+#endif
        bufused = strlen(buf);
        if ((bufused > 0) && (buf[bufused - 1] == '\n')) {
                buf[bufused - 1] = '\0';