mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #6124 from sizious/mruby-time-update
`mruby-time`: protect against incorrectly defined `_POSIX_TIMERS`
This commit is contained in:
@@ -83,6 +83,12 @@ double round(double x) {
|
||||
|
||||
/** end of Time class configuration */
|
||||
|
||||
/* protection against incorrectly defined _POSIX_TIMERS */
|
||||
#if (_POSIX_TIMERS + 0) == 0
|
||||
#undef _POSIX_TIMERS
|
||||
#define _POSIX_TIMERS 0
|
||||
#endif
|
||||
|
||||
#if (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) && defined(CLOCK_REALTIME)
|
||||
# define USE_CLOCK_GETTIME
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user