diff options
author | pquerna <pquerna@13f79535-47bb-0310-9956-ffa450edef68> | 2007-11-14 18:01:39 +0000 |
---|---|---|
committer | pquerna <pquerna@13f79535-47bb-0310-9956-ffa450edef68> | 2007-11-14 18:01:39 +0000 |
commit | 5c75e607ab03dd88ab296e3734df00b2181e7ca7 (patch) | |
tree | 7772acc15687b725537d3d188d9a71ccde3af378 | |
parent | d5b2754357951b4679aced5fae4e6c99f4fc27ef (diff) | |
download | libapr-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-- | CHANGES | 3 | ||||
-rw-r--r-- | network_io/unix/multicast.c | 7 |
2 files changed, 8 insertions, 2 deletions
@@ -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) { |