From e817616a0ed32dcaa91e3ab7a64c9f3cefe191b5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 2 Oct 2007 21:12:01 +0000 Subject: r25476: Finally fix up new interface detection code :-). Jeremy. (This used to be commit fffdad52859b5a8bc5dd61912d80b93e8c030c8f) --- source3/configure.in | 4 ++-- source3/lib/interfaces.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/configure.in b/source3/configure.in index 919cfc93dc..c8cdf0a018 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -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 diff --git a/source3/lib/interfaces.c b/source3/lib/interfaces.c index e5b9d87488..632b38f2b6 100644 --- a/source3/lib/interfaces.c +++ b/source3/lib/interfaces.c @@ -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; -- cgit