summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpquerna <pquerna@13f79535-47bb-0310-9956-ffa450edef68>2007-11-14 18:01:39 +0000
committerpquerna <pquerna@13f79535-47bb-0310-9956-ffa450edef68>2007-11-14 18:01:39 +0000
commit5c75e607ab03dd88ab296e3734df00b2181e7ca7 (patch)
tree7772acc15687b725537d3d188d9a71ccde3af378
parentd5b2754357951b4679aced5fae4e6c99f4fc27ef (diff)
downloadlibapr-5c75e607ab03dd88ab296e3734df00b2181e7ca7.tar.gz
Merge r493802 from trunk to 1.2:
* network_io/unix/multicast.c (find_if_index): Fix build if APR_HAVE_IPV6 == 0 on platforms with getifaddrs(). PR: 39199 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.2.x@594993 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--network_io/unix/multicast.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 989568fb7..595d69269 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes for APR 1.2.12
+ *) Fix --disable-ipv6 build on platforms with getifaddrs().
+ PR 39199. [Joe Orton]
+
*) Fix DSO-related crash on z/OS caused by incorrect memory
allocation. [David Jones <oscaremma gmail.com>]
diff --git a/network_io/unix/multicast.c b/network_io/unix/multicast.c
index 38fc10627..8e8ac5ceb 100644
--- a/network_io/unix/multicast.c
+++ b/network_io/unix/multicast.c
@@ -57,11 +57,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;
/**
@@ -92,6 +94,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)
{