listen: don't compile ipv6Supported() if !HAVE_IPV6
The function ipv6Supported() is not used at all when IPv6 support was disabled at compile time.
This commit is contained in:
parent
9b0ce18144
commit
5232f05470
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user