From 4477e2e5a22e0c1217f02bd48006cdba91aabc1c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 1 Jul 2023 08:10:04 +0200 Subject: Fix argument types for printf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- timeprefix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/timeprefix.c b/timeprefix.c index 6be5fa6..45bc011 100644 --- a/timeprefix.c +++ b/timeprefix.c @@ -52,8 +52,8 @@ printline(const char *line) utctime = gmtime(&walltime.tv_sec); #endif - printf("[%010lu.%04lu %i-%02i-%02i %02i:%02i:%02i UTC] %s", - boottime.tv_sec, boottime.tv_nsec / 100000, + printf("[%010lli.%04li %i-%02i-%02i %02i:%02i:%02i UTC] %s", + (long long int)boottime.tv_sec, boottime.tv_nsec / 100000, utctime->tm_year + 1900, utctime->tm_mon + 1, utctime->tm_mday, utctime->tm_hour, utctime->tm_min, utctime->tm_sec, line); -- cgit v1.2.3-70-g09d2