From 6f7202cfd512d18f561af6708fe0823c9545f674 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 18 Apr 2016 03:45:42 +0200 Subject: tree-wide: fall back to now(CLOCK_MONOTONIC) if CLOCK_BOOTTIME unsupported (#3037) It was added in 2.6.39, and causes an assertion to fail when running in mock hosted on 2.6.32-based RHEL-6: Assertion 'clock_gettime(map_clock_id(clock_id), &ts) == 0' failed at systemd/src/basic/time-util.c:70, function now(). Aborting. --- src/core/dbus-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/dbus-timer.c') diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c index bc121b83a2..a0e61b023e 100644 --- a/src/core/dbus-timer.c +++ b/src/core/dbus-timer.c @@ -156,7 +156,7 @@ static int property_get_next_elapse_monotonic( usec_t a, b; a = now(CLOCK_MONOTONIC); - b = now(CLOCK_BOOTTIME); + b = now(clock_boottime_or_monotonic()); if (t->next_elapse_monotonic_or_boottime + a > b) x = t->next_elapse_monotonic_or_boottime + a - b; -- cgit v1.2.3-54-g00ecf