Author: jra Date: 2007-10-02 21:12:01 +0000 (Tue, 02 Oct 2007) New Revision: 25476
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25476 Log: Finally fix up new interface detection code :-). Jeremy. Modified: branches/SAMBA_3_2/source/configure.in branches/SAMBA_3_2/source/lib/interfaces.c branches/SAMBA_3_2_0/source/configure.in branches/SAMBA_3_2_0/source/lib/interfaces.c Changeset: Modified: branches/SAMBA_3_2/source/configure.in =================================================================== --- branches/SAMBA_3_2/source/configure.in 2007-10-02 20:39:41 UTC (rev 25475) +++ branches/SAMBA_3_2/source/configure.in 2007-10-02 21:12:01 UTC (rev 25476) @@ -3093,7 +3093,7 @@ 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 @@ 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 Modified: branches/SAMBA_3_2/source/lib/interfaces.c =================================================================== --- branches/SAMBA_3_2/source/lib/interfaces.c 2007-10-02 20:39:41 UTC (rev 25475) +++ branches/SAMBA_3_2/source/lib/interfaces.c 2007-10-02 21:12:01 UTC (rev 25476) @@ -126,7 +126,7 @@ 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; Modified: branches/SAMBA_3_2_0/source/configure.in =================================================================== --- branches/SAMBA_3_2_0/source/configure.in 2007-10-02 20:39:41 UTC (rev 25475) +++ branches/SAMBA_3_2_0/source/configure.in 2007-10-02 21:12:01 UTC (rev 25476) @@ -2973,7 +2973,7 @@ 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([ @@ -2983,7 +2983,7 @@ 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 Modified: branches/SAMBA_3_2_0/source/lib/interfaces.c =================================================================== --- branches/SAMBA_3_2_0/source/lib/interfaces.c 2007-10-02 20:39:41 UTC (rev 25475) +++ branches/SAMBA_3_2_0/source/lib/interfaces.c 2007-10-02 21:12:01 UTC (rev 25476) @@ -126,7 +126,7 @@ 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;