cvs commit: src/sbin/dhclient Makefile

Ruslan Ermilov ru at FreeBSD.org
Tue Jun 7 09:44:13 GMT 2005


On Tue, Jun 07, 2005 at 09:32:23AM +0000, Ruslan Ermilov wrote:
> ru          2005-06-07 09:32:23 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sbin/dhclient        Makefile 
>   Log:
>   - Remove OpenBSD'ism (bsd.own.mk).
>   - Remove redundant and harmful -Wall from CFLAGS.
>   
>   Revision  Changes    Path
>   1.23      +0 -4      src/sbin/dhclient/Makefile
> 
The following (or equivalent) fix is required to fix the build
on 64-bit platforms (where time_t is 64-bit type).  I think
casting to "int" (as opposed to casting to intmax_t) here is
acceptable.

%%%
Index: dhclient.c
===================================================================
RCS file: /home/ncvs/src/sbin/dhclient/dhclient.c,v
retrieving revision 1.2
diff -u -p -r1.2 dhclient.c
--- dhclient.c	7 Jun 2005 04:26:14 -0000	1.2
+++ dhclient.c	7 Jun 2005 09:37:43 -0000
@@ -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,7 @@ 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 +1196,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);
%%%


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20050607/2baccbc0/attachment.bin


More information about the cvs-src mailing list