diff --git a/legacy/ecore/configure.ac b/legacy/ecore/configure.ac index 8ff36d5d1b..e0f2d74bfb 100644 --- a/legacy/ecore/configure.ac +++ b/legacy/ecore/configure.ac @@ -857,20 +857,26 @@ PKG_CHECK_MODULES([EVAS], [evas >= 0.9.9], AC_HEADER_SYS_WAIT +have_addrinfo="no" case "$host_os" in mingw* | cegcc*) AC_DEFINE(HAVE_DLFCN_H, 1, [Define to 1 if you have the header file.]) AC_DEFINE(HAVE_SYS_MMAN_H, 1, [Define to 1 if you have the header file.]) AC_DEFINE(HAVE_SYS_TIME_H, 1, [Define to 1 if you have the header file.]) + have_addrinfo="yes" ;; *) - AC_CHECK_HEADERS([dlfcn.h features.h langinfo.h locale.h netdb.h sys/time.h sys/mman.h signal.h sys/resource.h]) + AC_CHECK_HEADERS([dlfcn.h features.h langinfo.h locale.h sys/time.h sys/mman.h signal.h sys/resource.h]) ;; esac # ecore_con -AC_CHECK_HEADERS([arpa/inet.h netinet/tcp.h netinet/in.h sys/socket.h sys/un.h ws2tcpip.h]) +AC_CHECK_HEADERS([arpa/inet.h arpa/nameser.h netinet/tcp.h netinet/in.h sys/socket.h sys/un.h ws2tcpip.h netdb.h]) + +if test "x${ac_cv_header_netdb_h}" = "xyes" ; then + have_addrinfo="yes" +fi # Framebuffer (ecore_fb) have_fb="no" @@ -979,7 +985,7 @@ ECORE_CHECK_MODULE([data], [${want_ecore_data}], [Data]) ECORE_CHECK_MODULE([txt], [${want_ecore_txt}], [Txt], [$have_iconv]) # ecore_con -ECORE_CHECK_MODULE([con], [${want_ecore_con}], [Con]) +ECORE_CHECK_MODULE([con], [${want_ecore_con}], [Con], [${have_addrinfo}]) have_curl="no" have_gnutls="no" diff --git a/legacy/ecore/src/lib/ecore_con/Ecore_Con.h b/legacy/ecore/src/lib/ecore_con/Ecore_Con.h index 31c81ee097..55f995f556 100644 --- a/legacy/ecore/src/lib/ecore_con/Ecore_Con.h +++ b/legacy/ecore/src/lib/ecore_con/Ecore_Con.h @@ -6,7 +6,9 @@ #include #include -#ifdef HAVE_NETDB_H +#ifdef _WIN32 +# include +#else # include #endif #include diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_info.c b/legacy/ecore/src/lib/ecore_con/ecore_con_info.c index a4298bdde0..556640f431 100644 --- a/legacy/ecore/src/lib/ecore_con/ecore_con_info.c +++ b/legacy/ecore/src/lib/ecore_con/ecore_con_info.c @@ -37,11 +37,26 @@ void *alloca (size_t); #ifdef __OpenBSD__ # include #endif -#include -#include -#include -#include -#include + +#ifdef HAVE_ARPA_INET_H +# include +#endif + +#ifdef HAVE_ARPA_NAMESER_H +# include +#endif + +#ifdef HAVE_NETINET_IN_H +# include +#endif + +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + +#ifdef HAVE_NETDB_H +# include +#endif #include "Ecore.h" #include "ecore_private.h"