aboutsummaryrefslogtreecommitdiffstats
path: root/src/listen.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-15 08:33:32 +0100
committerMax Kellermann <max@duempel.org>2009-01-15 08:33:32 +0100
commit5232f054705688bbc18c7947ff29b237c9cafc85 (patch)
tree13c4faa3b82875c748ca8ec89e42a16d0e8e6b9a /src/listen.c
parent9b0ce18144f8d25bea54cb649508a5268c92efa6 (diff)
downloadmpd-5232f054705688bbc18c7947ff29b237c9cafc85.tar.gz
mpd-5232f054705688bbc18c7947ff29b237c9cafc85.tar.xz
mpd-5232f054705688bbc18c7947ff29b237c9cafc85.zip
listen: don't compile ipv6Supported() if !HAVE_IPV6
The function ipv6Supported() is not used at all when IPv6 support was disabled at compile time.
Diffstat (limited to 'src/listen.c')
-rw-r--r--src/listen.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/listen.c b/src/listen.c
index d0dfa3c71..df523e7a6 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)