From 122886a1e045b6711c6a11c9d90d10faee896958 Mon Sep 17 00:00:00 2001 From: bde Date: Mon, 29 Jun 1998 17:06:00 +0000 Subject: Don't assume that time_t is long. --- libexec/talkd/announce.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libexec/talkd') diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c index f621166..cd4dc55 100644 --- a/libexec/talkd/announce.c +++ b/libexec/talkd/announce.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)announce.c 8.3 (Berkeley) 4/28/95"; #endif static const char rcsid[] = - "$Id$"; + "$Id: announce.c,v 1.9 1997/12/02 12:33:11 charnier Exp $"; #endif /* not lint */ #include @@ -104,6 +104,7 @@ print_mesg(tty, tf, request, remote_machine) char *remote_machine; { struct timeval clock; + time_t clock_sec; struct timezone zone; struct tm *localtime(); struct tm *localclock; @@ -117,7 +118,8 @@ print_mesg(tty, tf, request, remote_machine) i = 0; max_size = 0; gettimeofday(&clock, &zone); - localclock = localtime( &clock.tv_sec ); + clock_sec = clock.tv_sec; + localclock = localtime(&clock_sec); (void)snprintf(line_buf[i], N_CHARS, " "); sizes[i] = strlen(line_buf[i]); max_size = max(max_size, sizes[i]); -- cgit v1.1