3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- busybox-1.01/networking/udhcp/dhcpc.c~dhcp-hostname
7 +++ busybox-1.01/networking/udhcp/dhcpc.c
12 + char hostbuf[256]; /* SUSv2: hostnames are <= 255 bytes */
14 static const struct option arg_options[] = {
15 {"clientid", required_argument, 0, 'c'},
20 + if (gethostname (hostbuf, sizeof (hostbuf)) == 0) {
21 + len = strlen (hostbuf);
22 + client_config.hostname = xmalloc (len + 2);
23 + client_config.hostname[OPT_CODE] = DHCP_HOST_NAME;
24 + client_config.hostname[OPT_LEN] = len;
25 + strncpy(client_config.hostname + 2, hostbuf, len);