summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-10-10 11:36:46 +0100
committerCarl Hetherington <cth@carlh.net>2015-10-10 11:36:46 +0100
commitd456cc07a466329a4c07e5c13322b34814e6489e (patch)
tree72e06434b0560e6ab59998e76f6b51889c4fce0c /src/lib
parent152736366e36ecf4d3cef4bc317bbefd1de0d141 (diff)
Fix windows build
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/log_entry.cc3
1 files changed, 2 insertions, 1 deletions
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_(": ");