summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient/dhclient.c
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2005-06-07 14:47:54 +0000
committerbrooks <brooks@FreeBSD.org>2005-06-07 14:47:54 +0000
commit8ab6a7967779201496380741cdbe2b534126244b (patch)
tree6d4105b74c9ddd946257f15b661eff51b6adf2ff /sbin/dhclient/dhclient.c
parent163c101c2cf347c70a3fe18f9acab4779cd2484b (diff)
downloadFreeBSD-src-8ab6a7967779201496380741cdbe2b534126244b.zip
FreeBSD-src-8ab6a7967779201496380741cdbe2b534126244b.tar.gz
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
Diffstat (limited to 'sbin/dhclient/dhclient.c')
-rw-r--r--sbin/dhclient/dhclient.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index c3f4aaa..14a1562 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 @@ again:
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);
OpenPOWER on IntegriCloud