From d456cc07a466329a4c07e5c13322b34814e6489e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 10 Oct 2015 11:36:46 +0100 Subject: [PATCH] Fix windows build --- src/lib/log_entry.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/log_entry.cc b/src/lib/log_entry.cc index 9b399e4b6..7c0f68787 100644 --- a/src/lib/log_entry.cc +++ b/src/lib/log_entry.cc @@ -45,7 +45,8 @@ LogEntry::get () const s << _time.tv_sec << ":" << _time.tv_usec; } else { char buffer[64]; - struct tm* t = localtime (&_time.tv_sec); + time_t const sec = _time.tv_sec; + struct tm* t = localtime (&sec); strftime (buffer, 64, "%c", t); string a (buffer); s << a.substr (0, a.length() - 1) << N_(": "); -- 2.30.2