From: Yang Tse Date: Mon, 1 Jun 2009 09:19:16 +0000 (+0000) Subject: John E. Malmberg noticed that the configure script was failing to detect the X-Git-Tag: curl-7_19_6~201 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61a967095d97d6b6d28d4d4bcec432e338f7368b;p=curl John E. Malmberg noticed that the configure script was failing to detect the timeval struct on VMS when building with _XOPEN_SOURCE_EXTENDED undefined due to definition taking place in socket.h instead of time.h --- 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([[ @@ -1882,6 +1882,9 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [ #ifdef HAVE_TIME_H #include #endif +#endif +#ifdef HAVE_SYS_SOCKET_H +#include #endif ]],[[ struct timeval ts; 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([[ @@ -1350,6 +1350,9 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [ #ifdef HAVE_TIME_H #include #endif +#endif +#ifdef HAVE_SYS_SOCKET_H +#include #endif ]],[[ struct timeval ts;