diff --git a/ares/ares.h b/ares/ares.h index 7ea70543fa..e2c7f4c051 100644 --- a/ares/ares.h +++ b/ares/ares.h @@ -51,8 +51,8 @@ # include # include #else - #include #include + #include #endif #ifdef __cplusplus diff --git a/ares/ares_expand_name.c b/ares/ares_expand_name.c index dc5b107533..8a9d822154 100644 --- a/ares/ares_expand_name.c +++ b/ares/ares_expand_name.c @@ -17,6 +17,9 @@ #include "setup.h" +#ifdef HAVE_SYS_SOCKET_H +# include +#endif #ifdef HAVE_NETINET_IN_H # include #endif diff --git a/ares/ares_expand_string.c b/ares/ares_expand_string.c index ead60a4071..f2d4f748a5 100644 --- a/ares/ares_expand_string.c +++ b/ares/ares_expand_string.c @@ -17,6 +17,9 @@ #include "setup.h" +#ifdef HAVE_SYS_SOCKET_H +# include +#endif #ifdef HAVE_NETINET_IN_H # include #endif diff --git a/ares/ares_mkquery.c b/ares/ares_mkquery.c index a9c9187f77..27ec1ee1b0 100644 --- a/ares/ares_mkquery.c +++ b/ares/ares_mkquery.c @@ -17,6 +17,9 @@ #include "setup.h" +#ifdef HAVE_SYS_SOCKET_H +# include +#endif #ifdef HAVE_NETINET_IN_H # include #endif diff --git a/ares/ares_query.c b/ares/ares_query.c index 14a0d66bca..0d1f036810 100644 --- a/ares/ares_query.c +++ b/ares/ares_query.c @@ -17,6 +17,9 @@ #include "setup.h" +#ifdef HAVE_SYS_SOCKET_H +# include +#endif #ifdef HAVE_NETINET_IN_H # include #endif diff --git a/ares/ares_send.c b/ares/ares_send.c index be5478df2d..54e4861852 100644 --- a/ares/ares_send.c +++ b/ares/ares_send.c @@ -17,6 +17,9 @@ #include "setup.h" +#ifdef HAVE_SYS_SOCKET_H +# include +#endif #ifdef HAVE_NETINET_IN_H # include #endif