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.
This commit is contained in:
Lubomir Rintel
2016-04-17 21:45:42 -04:00
committed by Zbigniew Jędrzejewski-Szmek
parent 746af6e0b5
commit 6f7202cfd5
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -320,7 +320,7 @@ static usec_t monotonic_to_boottime(usec_t t) {
if (t <= 0)
return 0;
a = now(CLOCK_BOOTTIME);
a = now(clock_boottime_or_monotonic());
b = now(CLOCK_MONOTONIC);
if (t + a > b)