Skip site navigation (1)Skip section navigation (2)
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--ftEhullJWpWg/VHq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jun 07, 2005 at 09:32:23AM +0000, Ruslan Ermilov wrote:
> ru          2005-06-07 09:32:23 UTC
>=20
>   FreeBSD src repository
>=20
>   Modified files:
>     sbin/dhclient        Makefile=20
>   Log:
>   - Remove OpenBSD'ism (bsd.own.mk).
>   - Remove redundant and harmful -Wall from CFLAGS.
>  =20
>   Revision  Changes    Path
>   1.23      +0 -4      src/sbin/dhclient/Makefile
>=20
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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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)
=20
 	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 =3D S_BOUND;
 	reinitialize_interfaces();
 	go_daemon();
@@ -1145,7 +1145,7 @@ again:
=20
 	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);
=20
 	/* 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 =3D 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,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--ftEhullJWpWg/VHq
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQFCpWyEqRfpzJluFF4RApX6AJ0d9TRRuEP6a5h0Dld3jLufjlqi6wCfUzZY
H4Wwk9U+3hYcVXFp9F84TO0=
=nhuo
-----END PGP SIGNATURE-----

--ftEhullJWpWg/VHq--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050607094436.GB31613>