]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Fix build on systems with no monotonic clock
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 4 May 2023 06:23:08 +0000 (07:23 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 4 May 2023 06:23:08 +0000 (07:23 +0100)
Issue: #4478

contrib/libev/ev.c

index 591a8cc8eeebce4b4c6f1cd8465feecfca52900b..8657aa96ee2aa28cbd16322a4ec645cb546f003e 100644 (file)
@@ -4130,6 +4130,7 @@ ev_run (EV_P_ int flags)
         if (ecb_expect_true (!(flags & EVRUN_NOWAIT || idleall || !activecnt || pipe_write_skipped)))
           {
             waittime = EV_TS_CONST (MAX_BLOCKTIME);
+#if EV_USE_MONOTONIC
             if (ecb_expect_true (have_monotonic)) {
 #if EV_USE_TIMERFD
             /* sleep a lot longer when we can reliably detect timejumps */
@@ -4143,7 +4144,7 @@ ev_run (EV_P_ int flags)
               waittime = EV_TS_CONST (MAX_BLOCKTIME2);
 #endif
             }
-
+#endif /* EV_USE_MONOTONIC */
             if (timercnt)
               {
                 ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now;