chiark / gitweb /
tree-wide: don't assume CLOCK_BOOTIME is generally available
authorLennart Poettering <lennart@poettering.net>
Wed, 20 Apr 2016 16:12:57 +0000 (18:12 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:58 +0000 (10:12 +0200)
commit99d43b8fa4059271600d7b86e55224ce4309430d
tree67c627888c436edff2dfb696a2366914d4502603
parent888475ce4027042053b890f10f346946c9d6cf7b
tree-wide: don't assume CLOCK_BOOTIME is generally available

Before we invoke now(CLOCK_BOOTTIME), let's make sure we actually have that
clock, since now() will otherwise hit an assert.

Specifically, let's refuse CLOCK_BOOTTIME early in sd-event if the kernel
doesn't actually support it.

This is a follow-up for #3037, and specifically:

https://github.com/elogind/elogind/pull/3037#issuecomment-210199167
src/basic/time-util.c
src/libelogind/sd-event/sd-event.c