summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2005-01-10 16:36:56 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2005-01-10 16:36:56 +0000
commit576e93a583d65f624b1922bc75f053621ca67120 (patch)
tree370789806d24ba085eb1422d6efd8f1e9665f4a2
parent647b9e8a4940ff065d2b6e84fde7175cd9b1566f (diff)
downloadlibapr-576e93a583d65f624b1922bc75f053621ca67120.tar.gz
* network_io/unix/multicast.c: Use #ifdef not #if for HAVE_GETIFADDRS.
(find_if_index): Fix unused variables warnings if HAVE_GETIFADDRS is undefined. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@124813 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--network_io/unix/multicast.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/network_io/unix/multicast.c b/network_io/unix/multicast.c
index ba92bb9f4..695500f19 100644
--- a/network_io/unix/multicast.c
+++ b/network_io/unix/multicast.c
@@ -19,7 +19,7 @@
#include "apr_portable.h"
#include "apr_arch_inherit.h"
-#if HAVE_GETIFADDRS
+#ifdef HAVE_GETIFADDRS
#include <net/if.h>
#include <ifaddrs.h>
#endif
@@ -59,6 +59,7 @@ static void fill_mip_v4(struct ip_mreq *mip, apr_sockaddr_t *mcast,
static unsigned int find_if_index(const apr_sockaddr_t *iface)
{
unsigned int index = 0;
+#ifdef HAVE_GETIFADDRS
struct ifaddrs *ifp, *ifs;
/**
@@ -69,7 +70,6 @@ static unsigned int find_if_index(const apr_sockaddr_t *iface)
* getifaddrs. The license is acceptable, but, It is a fairly large
* chunk of code.
*/
-#if HAVE_GETIFADDRS
if (getifaddrs(&ifs) != 0) {
return 0;
}