Date: Tue, 7 Jun 2005 12:44:36 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Brooks Davis <brooks@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sbin/dhclient Makefile Message-ID: <20050607094436.GB31613@ip.net.ua> In-Reply-To: <200506070932.j579WNlL081646@repoman.freebsd.org> References: <200506070932.j579WNlL081646@repoman.freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
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@FreeBSD.org
FreeBSD committer
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)
iD8DBQFCpWyEqRfpzJluFF4RApX6AJ0d9TRRuEP6a5h0Dld3jLufjlqi6wCfUzZY
H4Wwk9U+3hYcVXFp9F84TO0=
=nhuo
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050607094436.GB31613>
