diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/ruby/intern.h | 5 | ||||
| -rw-r--r-- | include/ruby/missing.h | 17 |
2 files changed, 15 insertions, 7 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 9745afdfda..6e1c2c2d90 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -31,6 +31,11 @@ extern "C" { #else # include <varargs.h> #endif + +#if defined(HAVE_SYS_TYPES_H) +#include <sys/types.h> +#endif + #include "ruby/st.h" #if defined __GNUC__ && __GNUC__ >= 4 diff --git a/include/ruby/missing.h b/include/ruby/missing.h index bded5521d1..d2cacd2706 100644 --- a/include/ruby/missing.h +++ b/include/ruby/missing.h @@ -24,18 +24,21 @@ 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) -# include <sys/time.h> -#elif !defined(_WIN32) -# define time_t long +# include <sys/time.h> +#endif +#endif + +#if !defined(HAVE_STRUCT_TIMEVAL) struct timeval { time_t tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; -#endif -#if defined(HAVE_SYS_TYPES_H) -# include <sys/types.h> -#endif +#endif /* HAVE_STRUCT_TIMEVAL */ #if !defined(HAVE_STRUCT_TIMESPEC) struct timespec { |
