Fix Windows gcc build. Needs some def to get w7+ windows api

This commit is contained in:
Jean-Francois Dockes
2020-04-25 11:41:37 +02:00
parent 07e3387fc1
commit 2f794be314
17 changed files with 43 additions and 16 deletions
+1 -1
View File
@@ -1701,7 +1701,7 @@ bool Db::addOrUpdate(const string &udi, const string &parent_udi, Doc &doc)
// won't work).
time_t mtime = atoll(doc.dmtime.empty() ? doc.fmtime.c_str() :
doc.dmtime.c_str());
struct tm tmb{0};
struct tm tmb{0,0,0,0,0,0,0,0,0};
localtime_r(&mtime, &tmb);
char buf[50]; // It's actually 9, but use 50 to suppress warnings.
snprintf(buf, 50, "%04d%02d%02d",