Commit 083126c8 authored by Dominik Charousset's avatar Dominik Charousset

Fix build on MSVC

parent 59ed7e08
...@@ -24,7 +24,11 @@ namespace caf::detail { ...@@ -24,7 +24,11 @@ namespace caf::detail {
size_t print_timestamp(char* buf, size_t buf_size, time_t ts, size_t ms) { size_t print_timestamp(char* buf, size_t buf_size, time_t ts, size_t ms) {
tm time_buf; tm time_buf;
#ifdef CAF_MSVC
localtime_s(&time_buf, &ts);
#else
localtime_r(&ts, &time_buf); localtime_r(&ts, &time_buf);
#endif
auto pos = strftime(buf, buf_size, "%FT%T", &time_buf); auto pos = strftime(buf, buf_size, "%FT%T", &time_buf);
buf[pos++] = '.'; buf[pos++] = '.';
if (ms > 0) { if (ms > 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment