summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/missing.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index fc333e1a47..cf97ca2133 100644
--- a/include/ruby/missing.h
+++ b/include/ruby/missing.h
@@ -25,12 +25,14 @@ extern "C" {
#include RUBY_EXTCONF_H
#endif
+#if !defined(HAVE_STRUCT_TIMEVAL) || !defined(HAVE_STRUCT_TIMESPEC)
#if defined(HAVE_TIME_H)
# include <time.h>
#endif
-#if defined(HAVE_SYS_TIME_H)
+#if defined(HAVE_SYS_TIME_H) && !defined(__linux__)
# include <sys/time.h>
#endif
+#endif
#if !defined(HAVE_STRUCT_TIMEVAL)
struct timeval {