r18548: don't use #elif as we don't notice when 2 HAVE_IFACE_ versions are defined
authorStefan Metzmacher <metze@samba.org>
Fri, 15 Sep 2006 09:30:32 +0000 (09:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:18:45 +0000 (14:18 -0500)
try to find the problem on Tru64...where configure says the AIX method finds 1 interface
but later can't compile netif.c. (revision 18486 was the last that detects ifconf with 2 interfaces)

metze
(This used to be commit 8fa9852160680054ddb5316c4ee03a03f8553a37)

source4/lib/socket/netif.c

index 0344febf3806e40c8028a0cd0a550c20c479bc0c..7484baa68138bb1ef1c5dfc958a4ddf9dd324083 100644 (file)
@@ -152,7 +152,9 @@ static int _get_interfaces(struct iface_struct *ifaces, int max_interfaces)
        return total;
 }  
 
-#elif HAVE_IFACE_IFREQ
+#define _FOUND_IFACE_ANY
+#endif /* HAVE_IFACE_IFCONF */
+#ifdef HAVE_IFACE_IFREQ
 
 #ifndef I_STR
 #include <sys/stropts.h>
@@ -247,7 +249,9 @@ static int _get_interfaces(struct iface_struct *ifaces, int max_interfaces)
        return total;
 }
 
-#elif HAVE_IFACE_AIX
+#define _FOUND_IFACE_ANY
+#endif /* HAVE_IFACE_IFREQ */
+#ifdef HAVE_IFACE_AIX
 
 /****************************************************************************
 this one is for AIX (tested on 4.2)
@@ -335,7 +339,9 @@ static int _get_interfaces(struct iface_struct *ifaces, int max_interfaces)
        return total;
 }
 
-#else /* a dummy version */
+#define _FOUND_IFACE_ANY
+#endif /* HAVE_IFACE_AIX */
+#ifndef _FOUND_IFACE_ANY
 static int _get_interfaces(struct iface_struct *ifaces, int max_interfaces)
 {
        return -1;