diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-08 11:36:00 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-08 11:50:52 +0900 |
| commit | cb3a6dd16863da17ae84295e64441110a38bb347 (patch) | |
| tree | ca7d9d0bc5aef2983d7af790393d53c3db28cef5 /mrbgems/mruby-time/src | |
| parent | 833f556c70b33d427e36d737289e744c496a4d90 (diff) | |
| download | mruby-cb3a6dd16863da17ae84295e64441110a38bb347.tar.gz mruby-cb3a6dd16863da17ae84295e64441110a38bb347.zip | |
ISO C99 doesn't support unnamed unions; fix #5354
Diffstat (limited to 'mrbgems/mruby-time/src')
| -rw-r--r-- | mrbgems/mruby-time/src/time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-time/src/time.c b/mrbgems/mruby-time/src/time.c index dc8a8ef22..5446d43f2 100644 --- a/mrbgems/mruby-time/src/time.c +++ b/mrbgems/mruby-time/src/time.c @@ -125,7 +125,7 @@ gettimeofday(struct timeval *tv, void *tz) # include <sys/time.h> # endif #endif -#ifdef NO_GMTIME_R +#if !(defined(_POSIX_C_SOURCE) || defined(_BSD_SOURCE) || defined(_SVID_SOURCE)) #define gmtime_r(t,r) gmtime(t) #define localtime_r(t,r) localtime(t) #endif @@ -383,7 +383,7 @@ current_mrb_time(mrb_state *mrb) sec = ts.tv_sec; usec = ts.tv_nsec / 1000; } -#elif (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) && defined(_POSIX_MONOTONIC_CLOCK) +#elif (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) && defined(CLOCK_MONOTONIC) { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); |
