dnl Checks for library functions.
AC_TYPE_SIGNAL
-AC_CHECK_FUNCS([asprintf fchmod fork gettimeofday random select setns strdup usleep getifaddrs],
+AC_CHECK_FUNCS([asprintf fchmod fork gettimeofday random select setns strdup usleep getifaddrs freeifaddrs],
[], [], [#include "$srcdir/src/have.h"]
)
});
}
-#ifdef HAVE_IFADDRS_H
+#if defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
struct ifaddrs *ifa = NULL;
getifaddrs(&ifa);
#endif
c->last_ping_time = 0;
}
-#ifdef HAVE_IFADDRS_H
+#if defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
if(!ifa) {
continue;
#endif
}
-#ifdef HAVE_IFADDRS_H
+#if defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS) && defined(HAVE_FREEIFADDRS)
if(ifa) {
freeifaddrs(ifa);