mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
option.c: fix NO_DHCP6 build error
Errors encountered if building with 'NO_DHCP6' introduced by
commit 137286e9ba
option.c: In function 'dhcp_config_free':
option.c:1040:24: error: 'struct dhcp_config' has no member named 'addr6'; did you mean 'addr'?
for (addr = config->addr6; addr; addr = tmp)
^~~~~
addr
option.c: In function 'one_opt':
option.c:3227:7: error: 'struct dhcp_config' has no member named 'addr6'; did you mean 'addr'?
new->addr6 = NULL;
^~~~~
addr
Wrap new code in ifdef HAVE_DHCP6
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
This commit is contained in:
committed by
Simon Kelley
parent
48755ebf09
commit
8d6d5730c9
@@ -1036,6 +1036,7 @@ static void dhcp_config_free(struct dhcp_config *config)
|
||||
if (config->flags & CONFIG_CLID)
|
||||
free(config->clid);
|
||||
|
||||
#ifdef HAVE_DHCP6
|
||||
if (config->flags & CONFIG_ADDR6)
|
||||
{
|
||||
struct addrlist *addr, *tmp;
|
||||
@@ -1046,6 +1047,7 @@ static void dhcp_config_free(struct dhcp_config *config)
|
||||
free(addr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
free(config);
|
||||
}
|
||||
@@ -3227,7 +3229,9 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
||||
new->netid = NULL;
|
||||
new->filter = NULL;
|
||||
new->clid = NULL;
|
||||
#ifdef HAVE_DHCP6
|
||||
new->addr6 = NULL;
|
||||
#endif
|
||||
|
||||
while (arg)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user