r25476: Finally fix up new interface detection code :-).
authorJeremy Allison <jra@samba.org>
Tue, 2 Oct 2007 21:12:01 +0000 (21:12 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:31:07 +0000 (12:31 -0500)
Jeremy.

source/configure.in
source/lib/interfaces.c

index 919cfc93dc32bfd0da108d86bc5f3405094b5d5b..c8cdf0a0189aeb2071e291010e46670f969cb41b 100644 (file)
@@ -3093,7 +3093,7 @@ if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
 fi
 
 if test $iface = no; then
-AC_CACHE_CHECK([for iface getifaddrs],samba_cv_HAVE_GETIFADDRS,[
+AC_CACHE_CHECK([for iface getifaddrs],samba_cv_HAVE_IFACE_GETIFADDRS,[
 SAVE_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}"
 AC_TRY_RUN([
@@ -3103,7 +3103,7 @@ AC_TRY_RUN([
            samba_cv_HAVE_IFACE_GETIFADDRS=yes,samba_cv_HAVE_IFACE_GETIFADDRS=no,samba_cv_HAVE_IFACE_GETIFADDRS=cross)])
 CPPFLAGS="$SAVE_CPPFLAGS"
 if test x"$samba_cv_HAVE_IFACE_GETIFADDRS" = x"yes"; then
-    iface=yes;AC_DEFINE(HAVE_IFACE_GETIFADDRS,1,[Whether iface ifconf is available])
+    iface=yes;AC_DEFINE(HAVE_IFACE_GETIFADDRS,1,[Whether iface getifaddrs is available])
 fi
 fi
 
index e5b9d874881f67ad179e6964d1bedab2e8437584..632b38f2b63541bb24e404b7ec207e5e2d123ba4 100644 (file)
@@ -126,7 +126,7 @@ static int _get_interfaces(struct iface_struct *ifaces, int max_interfaces)
                ifaces[total].sa_family = ifptr->ifa_addr->sa_family;
 
                ifaces[total].iface_addr.ip =
-                       ((struct sockaddr_in *)ifptr->ifa_addr).sin_addr;
+                       ((struct sockaddr_in *)ifptr->ifa_addr)->sin_addr;
 
                ifaces[total].iface_netmask.netmask =
                        ((struct sockaddr_in *)ifptr->ifa_netmask)->sin_addr;