diff --git a/configure b/configure index 1cac4e0484a..a7e350e534d 100755 --- a/configure +++ b/configure @@ -16711,7 +16711,13 @@ _ACEOF fi -ac_fn_c_check_type "$LINENO" "struct __res_state" "ac_cv_type_struct___res_state" "#ifdef HAVE_RESOLV_H +ac_fn_c_check_type "$LINENO" "struct __res_state" "ac_cv_type_struct___res_state" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_RESOLV_H #include #endif " diff --git a/configure.ac b/configure.ac index cae8d72af12..413bfc98742 100644 --- a/configure.ac +++ b/configure.ac @@ -2347,7 +2347,13 @@ AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,, dnl Check for struct __res_state AC_CHECK_TYPES([struct __res_state],,, -[#ifdef HAVE_RESOLV_H +[#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_RESOLV_H #include #endif])