Fix backslashes in SHIBSP_PREFIX variable by manually creating it during the script...
[shibboleth/sp.git] / shibsp / util / TemplateParameters.cpp
index eee522d..f83abd2 100644 (file)
@@ -37,9 +37,12 @@ void TemplateParameters::setPropertySet(const PropertySet* props)
 
     // Create a timestamp.
     time_t now = time(NULL);
-#ifdef HAVE_CTIME_R
+#if defined(HAVE_CTIME_R_2)
     char timebuf[32];
     m_map["now"] = ctime_r(&now,timebuf);
+#elif defined(HAVE_CTIME_R_3)
+    char timebuf[32];
+    m_map["now"] = ctime_r(&now,timebuf,sizeof(timebuf));
 #else
     m_map["now"] = ctime(&now);
 #endif