Module: wine Branch: master Commit: 7f23bbe7f9b252ac6a9e0881b25315cc3a6eeca0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7f23bbe7f9b252ac6a9e0881b2...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Jun 19 13:47:38 2017 +0200
iphlpapi: Check if getifaddrs really exists.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
configure | 1 + configure.ac | 1 + dlls/iphlpapi/ifenum.c | 2 +- include/config.h.in | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure b/configure index 10a4204..55b5ad8 100755 --- a/configure +++ b/configure @@ -15403,6 +15403,7 @@ for ac_func in \ futimesat \ getattrlist \ getauxval \ + getifaddrs \ getopt_long_only \ getpwuid \ gettimeofday \ diff --git a/configure.ac b/configure.ac index 573d290..9ec90f9 100644 --- a/configure.ac +++ b/configure.ac @@ -2047,6 +2047,7 @@ AC_CHECK_FUNCS(\ futimesat \ getattrlist \ getauxval \ + getifaddrs \ getopt_long_only \ getpwuid \ gettimeofday \ diff --git a/dlls/iphlpapi/ifenum.c b/dlls/iphlpapi/ifenum.c index 3070ae5..eed1be1 100644 --- a/dlls/iphlpapi/ifenum.c +++ b/dlls/iphlpapi/ifenum.c @@ -815,7 +815,7 @@ static DWORD getIPAddrRowByName(PMIB_IPADDRROW ipAddrRow, const char *ifName, return ret; }
-#ifdef HAVE_IFADDRS_H +#if defined(HAVE_IFADDRS_H) && defined(HAVE_GETIFADDRS)
/* Counts the IPv4 addresses in the system using the return value from * getifaddrs, returning the count. diff --git a/include/config.h.in b/include/config.h.in index 7cdf70c..18cacd5 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -204,6 +204,9 @@ /* Define to 1 if you have the `getauxval' function. */ #undef HAVE_GETAUXVAL
+/* Define to 1 if you have the `getifaddrs' function. */ +#undef HAVE_GETIFADDRS + /* Define to 1 if you have the `getnameinfo' function. */ #undef HAVE_GETNAMEINFO