mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
node-driver: Cope with missing CLOCK_BOOTTIME
This commit is contained in:
parent
5aefb1f9f4
commit
f9559d2e83
1 changed files with 6 additions and 2 deletions
|
|
@ -95,14 +95,18 @@ static const struct clock_info {
|
||||||
#ifdef CLOCK_MONOTONIC_RAW
|
#ifdef CLOCK_MONOTONIC_RAW
|
||||||
{ "monotonic-raw", CLOCK_MONOTONIC_RAW },
|
{ "monotonic-raw", CLOCK_MONOTONIC_RAW },
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CLOCK_BOOTTIME
|
||||||
{ "boottime", CLOCK_BOOTTIME },
|
{ "boottime", CLOCK_BOOTTIME },
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool clock_for_timerfd(clockid_t id)
|
static bool clock_for_timerfd(clockid_t id)
|
||||||
{
|
{
|
||||||
return id == CLOCK_REALTIME ||
|
return id == CLOCK_REALTIME ||
|
||||||
id == CLOCK_MONOTONIC ||
|
#ifdef CLOCK_BOOTTIME
|
||||||
id == CLOCK_BOOTTIME;
|
id == CLOCK_BOOTTIME ||
|
||||||
|
#endif
|
||||||
|
id == CLOCK_MONOTONIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
static clockid_t clock_name_to_id(const char *name)
|
static clockid_t clock_name_to_id(const char *name)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue