aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/log.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/log.c b/src/log.c
index 3886a1a..3acb3cf 100644
--- a/src/log.c
+++ b/src/log.c
@@ -28,7 +28,8 @@ static inline void log_prefix_timestamp(FILE *dest)
buf[0] = '\0';
used += strftime(buf + used, sizeof(buf) - used, "%F %T", &tm);
- used += snprintf(buf + used, sizeof(buf) - used, ".%03ld | ", tv.tv_usec / 1000);
+ long long msec = (long long)tv.tv_usec / 1000;
+ used += snprintf(buf + used, sizeof(buf) - used, ".%03lld | ", msec);
fprintf(dest, "%s", buf);
}