src/dfxml.c: fix xml_add_DFXML_creator() for mingw32
This commit is contained in:
parent
2846258670
commit
73d49dbde9
1 changed files with 4 additions and 0 deletions
|
@ -250,8 +250,12 @@ void xml_add_DFXML_creator(const char *package, const char *version)
|
|||
{
|
||||
char outstr[200];
|
||||
const time_t t = time(NULL);
|
||||
#if defined(__MINGW32__) || defined(__FRAMAC__)
|
||||
const struct tm *tmptr = localtime(&t);
|
||||
#else
|
||||
struct tm tm_tmp;
|
||||
const struct tm *tmp = localtime_r(&t,&tm_tmp);
|
||||
#endif
|
||||
if (tmp != NULL &&
|
||||
strftime(outstr, sizeof(outstr), "%Y-%m-%dT%H:%M:%S%z", tmp) != 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue