time_t does not always fit into long, for instance on arm. So rather cast
it intmax_t and use %j in printf.
This commit is contained in:
parent
991633af2e
commit
db87e2dc03
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194684
@ -365,9 +365,9 @@ S_timeval(int l2, void *p)
|
|||||||
warnx("S_timeval %d != %d", l2, sizeof(*tv));
|
warnx("S_timeval %d != %d", l2, sizeof(*tv));
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
printf(hflag ? "{ sec = %'ld, usec = %'ld } " :
|
printf(hflag ? "{ sec = %'jd, usec = %'ld } " :
|
||||||
"{ sec = %ld, usec = %ld } ",
|
"{ sec = %jd, usec = %ld } ",
|
||||||
tv->tv_sec, tv->tv_usec);
|
(intmax_t)tv->tv_sec, tv->tv_usec);
|
||||||
tv_sec = tv->tv_sec;
|
tv_sec = tv->tv_sec;
|
||||||
p1 = strdup(ctime(&tv_sec));
|
p1 = strdup(ctime(&tv_sec));
|
||||||
for (p2=p1; *p2 ; p2++)
|
for (p2=p1; *p2 ; p2++)
|
||||||
|
Loading…
Reference in New Issue
Block a user