diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-19 17:48:05 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-19 17:48:05 +0000 |
commit | 466acd186d7f8fd96e4fbd3cc9a2524ba2c03ee0 (patch) | |
tree | 7341b68ed1dddcde988fff633a600fef2b8a4d4e /usr.sbin/mrouted | |
parent | 93befcf57380eafe63e453595cc78ad0521d87b6 (diff) |
from netbsd: tv_sec isn't a time_t, but a long. this causes some problems..
Diffstat (limited to 'usr.sbin/mrouted')
-rw-r--r-- | usr.sbin/mrouted/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/mrouted/main.c b/usr.sbin/mrouted/main.c index 6736317f885..7a3eaff086d 100644 --- a/usr.sbin/mrouted/main.c +++ b/usr.sbin/mrouted/main.c @@ -33,7 +33,7 @@ #ifndef lint static char rcsid[] = - "@(#) $Id: main.c,v 1.2 1995/12/14 01:45:26 deraadt Exp $"; + "@(#) $Id: main.c,v 1.3 1995/12/19 17:48:04 deraadt Exp $"; #endif extern char *configfilename; @@ -675,6 +675,7 @@ log(int severity, int syserr, char *format, ...) char tbuf[20]; struct timeval now; struct tm *thyme; + time_t t; va_start(ap, format); #else @@ -691,6 +692,7 @@ log(severity, syserr, format, va_alist) char tbuf[20]; struct timeval now; struct tm *thyme; + time_t t; va_start(ap); #endif @@ -704,7 +706,8 @@ log(severity, syserr, format, va_alist) case 2: if (severity > LOG_INFO ) break; default: gettimeofday(&now,NULL); - thyme = localtime(&now.tv_sec); + t = now.tv_sec; + thyme = localtime(&t); strftime(tbuf, sizeof(tbuf), "%X.%%03d ", thyme); fprintf(stderr, tbuf, now.tv_usec / 1000); fprintf(stderr, "%s", msg); |