3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 10:29:03 +02:00

nlmon: fix -Wformat under musl 1.2.0

musl 1.2.0 uses 64-bit time, even under 32-bit OSes. Cast to int64_t
and use the proper macro.
This commit is contained in:
Rosen Penev 2020-04-01 19:16:50 -07:00 committed by Denis Kenzior
parent 426681aeb2
commit 6b12593ec0

View File

@ -216,8 +216,9 @@ static void print_packet(const struct timeval *tv, char ident,
ts_pos += n; ts_pos += n;
} }
n = sprintf(ts_str + ts_pos, " %lu.%06lu", n = sprintf(ts_str + ts_pos, " %" PRId64 ".%06" PRId64,
tv->tv_sec - time_offset, tv->tv_usec); (int64_t)tv->tv_sec - time_offset,
(int64_t)tv->tv_usec);
if (n > 0) { if (n > 0) {
ts_pos += n; ts_pos += n;
ts_len += n; ts_len += n;