https://issues.shibboleth.net/jira/browse/CPPXT-18
[shibboleth/cpp-xmltooling.git] / xmltooling / base.h
index 77754ff..85f2f54 100644 (file)
@@ -26,6 +26,9 @@
 \r
 #include <typeinfo>\r
 \r
+/* Required for sprintf, used by integer XML attribute macros. */\r
+#include <cstdio>\r
+\r
 #if defined (_MSC_VER) || defined(__BORLANDC__)\r
   #include <xmltooling/config_pub_win32.h>\r
 #else\r
         void set##proper(const DateTime* proper) { \\r
             m_##proper = prepareForAssignment(m_##proper,proper); \\r
             if (m_##proper) \\r
-                m_##proper##Epoch=m_##proper->getEpoch(); \\r
+                m_##proper##Epoch=m_##proper->getEpoch(duration); \\r
         } \\r
         void set##proper(time_t proper) { \\r
             m_##proper = prepareForAssignment(m_##proper,proper,duration); \\r