diff --git a/src/net_setup.c b/src/net_setup.c index a389b4a6..0fd3a878 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -687,7 +687,10 @@ static bool add_listen_address(char *address, bool bindto) { *address = 0; } - struct addrinfo *ai, hint = {0}; + struct addrinfo *ai, hint; + + memset(&hint, 0x0, sizeof(struct addrinfo)); + hint.ai_family = addressfamily; hint.ai_socktype = SOCK_STREAM; hint.ai_protocol = IPPROTO_TCP;