apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r493802 - in /apr/apr/trunk: CHANGES network_io/unix/multicast.c
Date Sun, 07 Jan 2007 18:40:26 GMT
Author: jorton
Date: Sun Jan  7 10:40:25 2007
New Revision: 493802

URL: http://svn.apache.org/viewvc?view=rev&rev=493802
Log:
* network_io/unix/multicast.c (find_if_index): Fix build if
APR_HAVE_IPV6 == 0 on platforms with getifaddrs().

PR: 39199

Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/network_io/unix/multicast.c

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?view=diff&rev=493802&r1=493801&r2=493802
==============================================================================
--- apr/apr/trunk/CHANGES (original)
+++ apr/apr/trunk/CHANGES Sun Jan  7 10:40:25 2007
@@ -1,5 +1,8 @@
 Changes for APR 1.3.0
 
+  *) Fix --disable-ipv6 build on platforms with getifaddrs().
+     PR 39199.  [Joe Orton]
+
   *) Correctly retrieve 'empty' environment values with apr_env_get
      on Win32 (e.g. "VAR="), and added validation to testall suite.  
      PR 40764.  [Issac Goldstand <margol beamartyr.net>]

Modified: apr/apr/trunk/network_io/unix/multicast.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/network_io/unix/multicast.c?view=diff&rev=493802&r1=493801&r2=493802
==============================================================================
--- apr/apr/trunk/network_io/unix/multicast.c (original)
+++ apr/apr/trunk/network_io/unix/multicast.c Sun Jan  7 10:40:25 2007
@@ -38,11 +38,13 @@
     }
 }
 
-#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 @@
     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)
 {



Mime
View raw message