Problem with DHCLIENT vs 64-bit time_t

Dag-ErlingSmørgrav des at
Sun Feb 22 03:04:37 PST 2004

Garance A Drosihn <drosih at> writes:
> So, there definitely is something wrong with the dhclient from
> the base system  But it might be that people having trouble with
> dhcp on 64-bTT sparc systems could use the port, at least for
> the short-term.

Only takes a few minutes of eyeballing to figure out that the problem
is most likely on line 424 of src/contrib/isc-dhcp/common/parse.c:

        convert_num (cfile, (unsigned char *)timep, val, 10, 32);

idiotically, the final argument to convert_num() is supposed to be the
size in bits of the number to store in the location pointed to by the
second argument.  The simplest fix is to use a temporary int32_t and
assign it to *timep later, since convert_num() can't deal with 64-bit
quantities.  See attached (untested) patch.

Dag-Erling Smørgrav - des at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dhclient.diff
Type: text/x-patch
Size: 842 bytes
Desc: not available
Url :

More information about the freebsd-sparc64 mailing list