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:
Max Kellermann 2009-01-15 08:33:32 +01:00
parent 9b0ce18144
commit 5232f05470

View File

@ -113,19 +113,17 @@ static int establishListen(int pf, const struct sockaddr *addrp,
return 0; return 0;
} }
#ifdef HAVE_IPV6
static bool ipv6Supported(void) static bool ipv6Supported(void)
{ {
#ifdef HAVE_IPV6
int s; int s;
s = socket(AF_INET6, SOCK_STREAM, 0); s = socket(AF_INET6, SOCK_STREAM, 0);
if (s == -1) if (s == -1)
return false; return false;
close(s); close(s);
return true; return true;
#else
return false;
#endif
} }
#endif
static void static void
parseListenConfigParam(G_GNUC_UNUSED unsigned int port, ConfigParam * param) parseListenConfigParam(G_GNUC_UNUSED unsigned int port, ConfigParam * param)