summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mrouted/main.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1995-12-19 17:48:04 +0000
committerderaadt <deraadt@openbsd.org>1995-12-19 17:48:04 +0000
commit168d174014fe429a029c56524696e512fd9214f0 (patch)
tree64fc132408fb276e7b2acfd447d54d0dfa80129e /usr.sbin/mrouted/main.c
parentfrom fvdl; add msync(), readv() and writev() (diff)
downloadwireguard-openbsd-168d174014fe429a029c56524696e512fd9214f0.tar.xz
wireguard-openbsd-168d174014fe429a029c56524696e512fd9214f0.zip
from netbsd: tv_sec isn't a time_t, but a long. this causes some problems..
Diffstat (limited to 'usr.sbin/mrouted/main.c')
-rw-r--r--usr.sbin/mrouted/main.c7
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);