From 5232f054705688bbc18c7947ff29b237c9cafc85 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 15 Jan 2009 08:33:32 +0100 Subject: listen: don't compile ipv6Supported() if !HAVE_IPV6 The function ipv6Supported() is not used at all when IPv6 support was disabled at compile time. --- src/listen.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/listen.c b/src/listen.c index d0dfa3c7..df523e7a 100644 --- a/src/listen.c +++ b/src/listen.c @@ -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) -- cgit v1.2.3