summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/mrouted/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/mrouted/main.c b/usr.sbin/mrouted/main.c
index e3afa0da040..61bf49effd0 100644
--- a/usr.sbin/mrouted/main.c
+++ b/usr.sbin/mrouted/main.c
@@ -78,7 +78,7 @@ main(int argc, char *argv[])
register int recvlen;
int dummy;
FILE *fp;
- struct timeval tv;
+ struct timeval now;
u_int32_t prev_genid;
struct pollfd *pfd;
int vers, n, i, ch;
@@ -174,8 +174,8 @@ usage: fprintf(stderr,
/*
* Get generation id
*/
- gettimeofday(&tv, 0);
- dvmrp_genid = tv.tv_sec;
+ gettimeofday(&now, NULL);
+ dvmrp_genid = (u_int32_t)now.tv_sec; /* for a while after 2038 */
fp = fopen(genidfilename, "r");
if (fp != NULL) {