summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-06-29 17:06:00 +0000
committerbde <bde@FreeBSD.org>1998-06-29 17:06:00 +0000
commit122886a1e045b6711c6a11c9d90d10faee896958 (patch)
treeace78682a8f56db8f3a9f80b67be82ddd614b54c /libexec
parent0b0c5d1c4e51492acceb52c065db2dfd454a6494 (diff)
downloadFreeBSD-src-122886a1e045b6711c6a11c9d90d10faee896958.zip
FreeBSD-src-122886a1e045b6711c6a11c9d90d10faee896958.tar.gz
Don't assume that time_t is long.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/talkd/announce.c6
1 files changed, 4 insertions, 2 deletions
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 <sys/types.h>
@@ -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]);
OpenPOWER on IntegriCloud