64-bit time_t safe lease time
Martin Blapp
mb at imp.ch
Sat Jun 26 23:00:19 UTC 2004
Hi David,
Dag-Erling Smørgrav <des at des.no> has reported that the following patch
is neccessary for dhclient to work on platforms with a 64-bit time_t.
Can you include it ?
Martin
Index: contrib/isc-dhcp/common/parse.c
===================================================================
RCS file: /home/ncvs/src/contrib/isc-dhcp/common/parse.c,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 parse.c
--- contrib/isc-dhcp/common/parse.c 26 Jun 2004 10:34:20 -0000 1.1.1.9
+++ contrib/isc-dhcp/common/parse.c 26 Jun 2004 12:23:34 -0000
@@ -405,6 +405,7 @@
{
const char *val;
enum dhcp_token token;
+ int32_t num;
token = next_token (&val, (unsigned *)0, cfile);
if (token != NUMBER) {
@@ -412,9 +413,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);
}
More information about the dhcp-hackers
mailing list