Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tracepath: Fix print time_t problem on 32 bits musl
Similarly to 0fd2db7 this fixes warning on 32 bit musl 1.2.0, which changed time_t as 64-bit across all archs [1]. This fixes warning: ../tracepath.c:287:26: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Wformat=] 287 | printf(_("%3ld.%03ldms "), res.tv_sec * 1000 + res.tv_nsec / 1000000, | ^~~~~~~~~~~~~~~ ../iputils_common.h:25:27: note: in definition of macro '_' 25 | # define _(Text) gettext (Text) | ^~~~ ../tracepath.c:287:30: note: format string is defined here 287 | printf(_("%3ld.%03ldms "), res.tv_sec * 1000 + res.tv_nsec / 1000000, | ~~~^ | | | long int | %3lld [1] https://musl.libc.org/time64.html Closes: iputils#535 Reviewed-by: Cyril Hrubis <[email protected]> Signed-off-by: Petr Vorel <[email protected]>
- Loading branch information