From owner-freebsd-sparc64@FreeBSD.ORG Thu Jun 24 15:09:07 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E20916A4CF for ; Thu, 24 Jun 2004 15:09:07 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5E9B43D5C for ; Thu, 24 Jun 2004 15:09:06 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id E17AF530C; Thu, 24 Jun 2004 17:08:38 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id B540E530A; Thu, 24 Jun 2004 17:08:24 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id C97C5B86C; Thu, 24 Jun 2004 17:08:23 +0200 (CEST) To: Joerg Wunsch References: <20040624110043.A30818@ida.interface-business.de> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Thu, 24 Jun 2004 17:08:23 +0200 In-Reply-To: <20040624110043.A30818@ida.interface-business.de> (Joerg Wunsch's message of "Thu, 24 Jun 2004 11:00:43 +0200") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: dhcp-hackers@isc.org cc: sparc64@freebsd.org Subject: Re: Known 64-bit time_t issue with dhclient? X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jun 2004 15:09:07 -0000 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Joerg Wunsch writes: > bound to 193.101.57.69 -- renewal in 4673210995445900712 seconds. > ^^^^^^^^^^^^^^^^^^^ isc-dhcp incorrectly assumes that time_t is an int32_t; see attached patch for a workaround. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=dhclient.diff Index: contrib/isc-dhcp/common/parse.c =================================================================== RCS file: /home/ncvs/src/contrib/isc-dhcp/common/parse.c,v retrieving revision 1.1.1.8 diff -u -r1.1.1.8 parse.c --- contrib/isc-dhcp/common/parse.c 2 Sep 2003 11:01:23 -0000 1.1.1.8 +++ contrib/isc-dhcp/common/parse.c 22 Feb 2004 10:44:52 -0000 @@ -414,6 +414,7 @@ { const char *val; enum dhcp_token token; + int32_t num; token = next_token (&val, (unsigned *)0, cfile); if (token != NUMBER) { @@ -421,9 +422,9 @@ skip_to_semi (cfile); return; } - convert_num (cfile, (unsigned char *)timep, val, 10, 32); + convert_num (cfile, (unsigned char *)&num, val, 10, 32); /* Unswap the number - convert_num returns stuff in NBO. */ - *timep = ntohl (*timep); /* XXX */ + *timep = ntohl (num); parse_semi (cfile); } --=-=-=--