diff options
-rw-r--r-- | acinclude.m4 | 5 | ||||
-rw-r--r-- | ares/acinclude.m4 | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 790248b08..092cd4e40 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1852,7 +1852,7 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [ AC_REQUIRE([AC_HEADER_TIME])dnl AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl - AC_CHECK_HEADERS(sys/types.h sys/time.h time.h) + AC_CHECK_HEADERS(sys/types.h sys/time.h time.h sys/socket.h) AC_CACHE_CHECK([for struct timeval], [ac_cv_struct_timeval], [ AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ @@ -1883,6 +1883,9 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [ #include <time.h> #endif #endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif ]],[[ struct timeval ts; ts.tv_sec = 0; diff --git a/ares/acinclude.m4 b/ares/acinclude.m4 index e9690a713..6594b6fb6 100644 --- a/ares/acinclude.m4 +++ b/ares/acinclude.m4 @@ -1320,7 +1320,7 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [ AC_REQUIRE([AC_HEADER_TIME])dnl AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl - AC_CHECK_HEADERS(sys/types.h sys/time.h time.h) + AC_CHECK_HEADERS(sys/types.h sys/time.h time.h sys/socket.h) AC_CACHE_CHECK([for struct timeval], [ac_cv_struct_timeval], [ AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ @@ -1351,6 +1351,9 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [ #include <time.h> #endif #endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif ]],[[ struct timeval ts; ts.tv_sec = 0; |