diff options
author | Christophe Grenier <[email protected]> | 2020-08-24 18:59:05 +0200 |
---|---|---|
committer | Christophe Grenier <[email protected]> | 2020-08-24 18:59:05 +0200 |
commit | 73d49dbde93650c3ce08974c83142de0b87e229c (patch) | |
tree | d75b713c7bf3a10c6fa39d01e4590c58e1c11e68 /src/dfxml.c | |
parent | 28462586703df7507411b285174cd59b279bbd8d (diff) |
src/dfxml.c: fix xml_add_DFXML_creator() for mingw32
Diffstat (limited to 'src/dfxml.c')
-rw-r--r-- | src/dfxml.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dfxml.c b/src/dfxml.c index 947436e9..93b8db1f 100644 --- a/src/dfxml.c +++ b/src/dfxml.c @@ -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) { |