summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 fc333e1a474..cf97ca21334 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 {