diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/intern.h | 3 | ||||
-rw-r--r-- | include/ruby/missing.h | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h index e9be986f4f..ca6937a42d 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -560,7 +560,8 @@ VALUE rb_barrier_new(void); VALUE rb_barrier_wait(VALUE self); VALUE rb_barrier_release(VALUE self); /* time.c */ -VALUE rb_time_new(time_t, time_t); +VALUE rb_time_new(time_t, long); +VALUE rb_time_nano_new(time_t, long); /* variable.c */ VALUE rb_mod_name(VALUE); VALUE rb_class_path(VALUE); diff --git a/include/ruby/missing.h b/include/ruby/missing.h index 007c546617..05002daea8 100644 --- a/include/ruby/missing.h +++ b/include/ruby/missing.h @@ -25,13 +25,20 @@ extern "C" { # define time_t long struct timeval { time_t tv_sec; /* seconds */ - time_t tv_usec; /* microseconds */ + long tv_usec; /* microseconds */ }; #endif #if defined(HAVE_SYS_TYPES_H) # include <sys/types.h> #endif +#if !defined(HAVE_STRUCT_TIMESPEC) +struct timespec { + time_t tv_sec; /* seconds */ + long tv_nsec; /* nanoseconds */ +}; +#endif + #ifndef HAVE_ACOSH extern double acosh(double); extern double asinh(double); |