]> granicus.if.org Git - curl/commitdiff
John E. Malmberg noticed that the configure script was failing to detect the
authorYang Tse <yangsita@gmail.com>
Mon, 1 Jun 2009 09:19:16 +0000 (09:19 +0000)
committerYang Tse <yangsita@gmail.com>
Mon, 1 Jun 2009 09:19:16 +0000 (09:19 +0000)
timeval struct on VMS when building with _XOPEN_SOURCE_EXTENDED undefined due
to definition taking place in socket.h instead of time.h

acinclude.m4
ares/acinclude.m4

index 790248b080da0c3a4e46d351f0db6e664d40de28..092cd4e4096340371ac09c5cd8f9841e9dc85ae5 100644 (file)
@@ -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 <time.h>
 #endif
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
 #endif
       ]],[[
         struct timeval ts;
index e9690a71307f227431d51496865ab14c2c2cc20c..6594b6fb65a418f70a03c4eb6ed54ce324784d82 100644 (file)
@@ -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 <time.h>
 #endif
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
 #endif
       ]],[[
         struct timeval ts;