Commit 5232f054 authored by Max Kellermann's avatar Max Kellermann

listen: don't compile ipv6Supported() if !HAVE_IPV6

The function ipv6Supported() is not used at all when IPv6 support was disabled at compile time.
parent 9b0ce181
......@@ -113,19 +113,17 @@ static int establishListen(int pf, const struct sockaddr *addrp,
return 0;
}
#ifdef HAVE_IPV6
static bool ipv6Supported(void)
{
#ifdef HAVE_IPV6
int s;
s = socket(AF_INET6, SOCK_STREAM, 0);
if (s == -1)
return false;
close(s);
return true;
#else
return false;
#endif
}
#endif
static void
parseListenConfigParam(G_GNUC_UNUSED unsigned int port, ConfigParam * param)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment