Skip to content

Commit bd71243

Browse files
committed
Trying to have universal format specifier
1 parent a2d954d commit bd71243

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/logging.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <inttypes.h>
12
#include <stdarg.h>
23
#include <stdint.h>
34
#include <stdio.h> // NOLINT(llvmlibc-restrict-system-libc-headers)
@@ -78,7 +79,7 @@ void _log(const char *file, int line, int severity, const char *fmt, ...) {
7879

7980
struct timeval tv;
8081
gettimeofday(&tv, NULL);
81-
(void)fprintf(logf, "%s %8lu.%06lu %s:%d ", SeverityStr[severity],
82+
(void)fprintf(logf, "%s %8"PRIu64".%06"PRIu64" %s:%d ", SeverityStr[severity],
8283
(uint64_t)tv.tv_sec,
8384
(uint64_t)tv.tv_usec, file, line);
8485

0 commit comments

Comments
 (0)