From 1dfc9d7d371ba24b6295fb32465b18dacef22071 Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 28 Jun 2003 19:11:42 +0000 Subject: utmp.ut_time is not a time_t, do not pass a pointer to it to pr_attime(). --- usr.bin/w/w.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 7d3907b..8bf63d1 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -82,6 +82,7 @@ static const char sccsid[] = "@(#)w.c 8.4 (Berkeley) 4/16/94"; #include #include #include +#include #include #include #include @@ -356,6 +357,7 @@ main(int argc, char *argv[]) struct sockaddr *sa = (struct sockaddr *)&ss; struct sockaddr_in *lsin = (struct sockaddr_in *)&ss; struct sockaddr_in6 *lsin6 = (struct sockaddr_in6 *)&ss; + time_t t; int isaddr; host_buf[UT_HOSTSIZE] = '\0'; @@ -408,7 +410,8 @@ main(int argc, char *argv[]) strncmp(ep->utmp.ut_line, "cua", 3) ? ep->utmp.ut_line : ep->utmp.ut_line + 3, W_DISPHOSTSIZE, W_DISPHOSTSIZE, *p ? p : "-"); - pr_attime(&ep->utmp.ut_time, &now); + t = _time_to_time32(ep->utmp.ut_time); + pr_attime(&t, &now); longidle = pr_idle(ep->idle); (void)printf("%.*s\n", argwidth - longidle, ep->args); } -- cgit v1.1