timeval struct on VMS when building with _XOPEN_SOURCE_EXTENDED undefined due
to definition taking place in socket.h instead of time.h
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([[
#include <time.h>
#endif
#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
]],[[
struct timeval ts;
ts.tv_sec = 0;
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([[
#include <time.h>
#endif
#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
]],[[
struct timeval ts;
ts.tv_sec = 0;