summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-16 07:28:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-16 07:28:32 +0000
commitcab124776e911cc509598464831a0106ba975808 (patch)
tree7fd4a6d4cccd7fa6f1084bc01eff54d228cc072e /include/ruby
parentaf24f5ff6a9df492ac699dfc2d8158adaa4369df (diff)
mingw build fix
* configure.in: struct timeval is defined in winsock2.h on mingw. * include/ruby/missing.h: include time.h for time_t, and sys/time.h for timeval and timespec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/missing.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index 7ae2530239..fc333e1a47 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 */