summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in1
-rw-r--r--include/ruby/missing.h15
2 files changed, 8 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index 6b0b3431e0b..febcbe0832f 100644
--- a/configure.in
+++ b/configure.in
@@ -925,6 +925,7 @@ $POSTLINK"
ac_cv_func_flock=yes
ac_cv_func_gmtime_r=yes
rb_cv_large_fd_select=yes
+ ac_cv_type_struct_timeval=yes
AC_LIBOBJ([langinfo])
],
[os2-emx*], [ LIBS="-lm $LIBS"
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index 7ae2530239a..fc333e1a474 100644
--- a/include/ruby/missing.h
+++ b/include/ruby/missing.h
@@ -25,22 +25,21 @@ extern "C" {
#include RUBY_EXTCONF_H
#endif
+#if defined(HAVE_TIME_H)
+# include <time.h>
+#endif
+#if defined(HAVE_SYS_TIME_H)
+# include <sys/time.h>
+#endif
+
#if !defined(HAVE_STRUCT_TIMEVAL)
-# if defined(HAVE_SYS_TIME_H)
-# include <sys/time.h>
-# elif !defined(_WIN32)
-# define time_t long
struct timeval {
time_t tv_sec; /* seconds */
long tv_usec; /* microseconds */
};
-# endif
#endif /* HAVE_STRUCT_TIMEVAL */
#if !defined(HAVE_STRUCT_TIMESPEC)
-# if defined(HAVE_SYS_TIME_H)
-# include <sys/time.h>
-# endif
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */