From 9c13d9cd98466073af8c9f9b27872a153a9fbc5d Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Tue, 7 Jun 2005 14:47:54 +0000 Subject: [PATCH] Fix build on 64-bit platforms where time_t is 64 bit. Since where talking about time related to leases, it should be OK to cast these to (int)s rather than using intmax_t. Submitted by: ru Pointy hat: brooks --- sbin/dhclient/dhclient.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index c3f4aaa6ea5a..14a156287d9b 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -724,7 +724,7 @@ bind_lease(struct interface_info *ip) note("bound to %s -- renewal in %d seconds.", piaddr(ip->client->active->address), - ip->client->active->renewal - cur_time); + (int)(ip->client->active->renewal - cur_time)); ip->client->state = S_BOUND; reinitialize_interfaces(); go_daemon(); @@ -1145,7 +1145,8 @@ send_discover(void *ipp) note("DHCPDISCOVER on %s to %s port %d interval %d", ip->name, inet_ntoa(sockaddr_broadcast.sin_addr), - ntohs(sockaddr_broadcast.sin_port), ip->client->interval); + ntohs(sockaddr_broadcast.sin_port), + (int)ip->client->interval); /* Send out a packet. */ (void)send_packet(ip, &ip->client->packet, ip->client->packet_length, @@ -1196,8 +1197,8 @@ state_panic(void *ipp) ip->client->active->renewal) { ip->client->state = S_BOUND; note("bound: renewal in %d seconds.", - ip->client->active->renewal - - cur_time); + (int)(ip->client->active->renewal - + cur_time)); add_timeout( ip->client->active->renewal, state_bound, ip);