From ae43ce75933ff9629ff261c5e3e420c8f42236e4 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 25 Dec 2023 23:59:43 +0900 Subject: [PATCH] mruby-time: refactor _POSIX_TIMERS handling issue; ref #6124 --- mrbgems/mruby-time/src/time.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mrbgems/mruby-time/src/time.c b/mrbgems/mruby-time/src/time.c index 518fb3d61..59dcd80be 100644 --- a/mrbgems/mruby-time/src/time.c +++ b/mrbgems/mruby-time/src/time.c @@ -84,12 +84,7 @@ 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) +#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS + 0) > 0 && defined(CLOCK_REALTIME) # define USE_CLOCK_GETTIME #endif