summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/configure.in4
-rw-r--r--source3/lib/interfaces.c2
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;