diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2012-03-28 10:06:44 -0700 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2012-03-28 10:06:44 -0700 |
commit | 5e251c2d3e0be304c916a4e1bd0f87a2695fe760 (patch) | |
tree | d81cc3a93344b505b538ee16330054c346b434c2 | |
parent | 834e7fd2e5c98d8f9f00695cce347d07279e1955 (diff) | |
download | libnet-5e251c2d3e0be304c916a4e1bd0f87a2695fe760.tar.gz |
Only use getifaddrs() if it exists. (reported by Dagobert Michelsen)
-rw-r--r-- | libnet/configure.in | 3 | ||||
-rw-r--r-- | libnet/src/libnet_resolve.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libnet/configure.in b/libnet/configure.in index 7461197..d4d6da4 100644 --- a/libnet/configure.in +++ b/libnet/configure.in @@ -6,7 +6,7 @@ dnl All rights reserved. dnl dnl Process this file with autoconf to produce a configure script. -AC_INIT(libnet, 1.1.6) +AC_INIT(libnet, 1.1.6-rc3) AC_MSG_RESULT(beginning autoconfiguration process for libnet-${PACKAGE_VERSION} ...) AC_CANONICAL_SYSTEM AC_CONFIG_SRCDIR([src/libnet_build_ip.c]) @@ -31,6 +31,7 @@ ifdef( AC_CHECK_HEADERS(sys/sockio.h) AC_CHECK_FUNCS([gethostbyname2]) +AC_CHECK_FUNCS([getifaddrs]) AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_TYPE_UINT64_T diff --git a/libnet/src/libnet_resolve.c b/libnet/src/libnet_resolve.c index fd58956..3c3dfab 100644 --- a/libnet/src/libnet_resolve.c +++ b/libnet/src/libnet_resolve.c @@ -300,7 +300,7 @@ libnet_name2addr6(libnet_t *l, const char *host_name, uint8_t use_name) } } -#if !defined(__WIN32__) +#ifdef HAVE_GETIFADDRS #include <ifaddrs.h> |