summaryrefslogtreecommitdiff
path: root/network_io
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2007-01-07 18:40:25 +0000
committerJoe Orton <jorton@apache.org>2007-01-07 18:40:25 +0000
commita171a819227b07c61e737a28d202eafa0a0fb843 (patch)
treec3a4a8323c970f332adaf04a361898b5ac5d5573 /network_io
parent83dc7d52704993f96054d6c803bc03dde764cc3e (diff)
downloadapr-a171a819227b07c61e737a28d202eafa0a0fb843.tar.gz
* network_io/unix/multicast.c (find_if_index): Fix build if
APR_HAVE_IPV6 == 0 on platforms with getifaddrs(). PR: 39199 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@493802 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r--network_io/unix/multicast.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/network_io/unix/multicast.c b/network_io/unix/multicast.c
index 8667a1bb3..6ae962902 100644
--- a/network_io/unix/multicast.c
+++ b/network_io/unix/multicast.c
@@ -38,11 +38,13 @@ static void fill_mip_v4(struct ip_mreq *mip, apr_sockaddr_t *mcast,
}
}
-#if APR_HAVE_IPV6
+/* This function is only interested in AF_INET6 sockets, so a noop
+ * "return 0" implementation for the !APR_HAVE_IPV6 build is
+ * sufficient. */
static unsigned int find_if_index(const apr_sockaddr_t *iface)
{
unsigned int index = 0;
-#ifdef HAVE_GETIFADDRS
+#if defined(HAVE_GETIFADDRS) && APR_HAVE_IPV6
struct ifaddrs *ifp, *ifs;
/**
@@ -73,6 +75,7 @@ static unsigned int find_if_index(const apr_sockaddr_t *iface)
return index;
}
+#if APR_HAVE_IPV6
static void fill_mip_v6(struct ipv6_mreq *mip, const apr_sockaddr_t *mcast,
const apr_sockaddr_t *iface)
{