diff options
Diffstat (limited to 'include/ruby/missing.h')
-rw-r--r-- | include/ruby/missing.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/ruby/missing.h b/include/ruby/missing.h index 1297c43a7a..4a19cc7847 100644 --- a/include/ruby/missing.h +++ b/include/ruby/missing.h @@ -25,15 +25,18 @@ extern "C" { #include RUBY_EXTCONF_H #endif -#if defined(HAVE_SYS_TIME_H) +#if !defined(HAVE_STRUCT_TIMEVAL) +# if defined(HAVE_SYS_TIME_H) # include <sys/time.h> -#elif !defined(_WIN32) +# elif !defined(_WIN32) # define time_t long struct timeval { time_t tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; -#endif +# endif +#endif /* HAVE_STRUCT_TIMEVAL */ + #if defined(HAVE_SYS_TYPES_H) # include <sys/types.h> #endif |