File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -126,8 +126,15 @@ typedef unsigned int uintptr_t;
126126#define O_SHARE_DELETE 0x20000000 /* for rb_w32_open(), rb_w32_wopen() */
127127
128128typedef int clockid_t ;
129+ #if defined(__MINGW32__ )
130+ #undef CLOCK_PROCESS_CPUTIME_ID
131+ #undef CLOCK_THREAD_CPUTIME_ID
132+ #undef CLOCK_REALTIME_COARSE
133+ #endif
134+ #if defined(HAVE_CLOCK_GETTIME ) && !defined(CLOCK_REALTIME )
129135#define CLOCK_REALTIME 0
130136#define CLOCK_MONOTONIC 1
137+ #endif
131138
132139#undef utime
133140#undef lseek
Original file line number Diff line number Diff line change @@ -4761,6 +4761,7 @@ gettimeofday(struct timeval *tv, struct timezone *tz)
47614761 return 0 ;
47624762}
47634763
4764+ #if !defined(__MINGW32__ ) || !defined(HAVE_CLOCK_GETTIME )
47644765/* License: Ruby's */
47654766int
47664767clock_gettime (clockid_t clock_id , struct timespec * sp )
@@ -4800,7 +4801,9 @@ clock_gettime(clockid_t clock_id, struct timespec *sp)
48004801 return -1 ;
48014802 }
48024803}
4804+ #endif
48034805
4806+ #if !defined(__MINGW32__ ) || !defined(HAVE_CLOCK_GETRES )
48044807/* License: Ruby's */
48054808int
48064809clock_getres (clockid_t clock_id , struct timespec * sp )
@@ -4828,6 +4831,7 @@ clock_getres(clockid_t clock_id, struct timespec *sp)
48284831 return -1 ;
48294832 }
48304833}
4834+ #endif
48314835
48324836/* License: Ruby's */
48334837static char *
You can’t perform that action at this time.
0 commit comments