1 --- busybox/networking/udhcp/dhcpc.c 2005-05-25 11:49:24.000000000 +0100
2 +++ busybox/networking/udhcp/dhcpc.c 2005-05-25 12:54:30.000000000 +0100
7 + char hostbuf[256]; /* SUSv2: hostnames are <= 255 bytes */
9 static const struct option arg_options[] = {
10 {"clientid", required_argument, 0, 'c'},
15 + if (gethostname (hostbuf, sizeof (hostbuf)) == 0) {
16 + len = strlen (hostbuf);
17 + client_config.hostname = xmalloc (len + 2);
18 + client_config.hostname[OPT_CODE] = DHCP_HOST_NAME;
19 + client_config.hostname[OPT_LEN] = len;
20 + strncpy(client_config.hostname + 2, hostbuf, len);