From 76cf90a41071b8f1622f8a594bf6ece1645a62b9 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Tue, 10 May 2022 15:32:54 +0200 Subject: [PATCH] [network] compilation fix when ipv6 is disabled. --- src/network/socket.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/network/socket.c b/src/network/socket.c index e8ed93679..a7666bb86 100644 --- a/src/network/socket.c +++ b/src/network/socket.c @@ -535,16 +535,20 @@ connected(struct socket *socket) } static int to_bind; -static int to_bind_ipv6; - static struct sockaddr_in sa_bind; + +#ifdef CONFIG_IPV6 +static int to_bind_ipv6; static struct sockaddr_in6 sa6_bind; +#endif static void init_bind_address(void) { char *bind_address = get_cmd_opt_str("bind-address"); +#ifdef CONFIG_IPV6 char *bind_address_ipv6 = get_cmd_opt_str("bind-address-ipv6"); +#endif #ifdef HAVE_INET_PTON to_bind = (bind_address && *bind_address);