tc: {m_gate,q_etf,q_taprio}.c: fix compilation with older glibc versions
Subsystems (2)
PATCH 1/1 tc: {m_gate,q_etf,q_taprio}.c: fix compilation with older glibc versions
glibc < 2.14 does not define CLOCK_BOOTTIME
glibc < 2.21 does not define CLOCK_TAI
Signed-off-by Thomas Devoogdt <[email protected]>
--- tc/m_gate.c | 4 ++++ tc/q_etf.c | 4 ++++ tc/q_taprio.c | 4 ++++ 3 files changed, 12 insertions(+)
tc/m_gate.c +4 -0
@@ -26,8 +26,12 @@ static const struct clockid_table {clockid_t clockid; } clockt_map[] = { { "REALTIME", CLOCK_REALTIME }, +#ifdef CLOCK_TAI { "TAI", CLOCK_TAI }, +#endif +#ifdef CLOCK_BOOTTIME { "BOOTTIME", CLOCK_BOOTTIME }, +#endif { "MONOTONIC", CLOCK_MONOTONIC }, { NULL } };
tc/q_etf.c +4 -0
@@ -25,8 +25,12 @@ static const struct static_clockid {clockid_t clockid; } clockids_sysv[] = { { "REALTIME", CLOCK_REALTIME }, +#ifdef CLOCK_TAI { "TAI", CLOCK_TAI }, +#endif +#ifdef CLOCK_BOOTTIME { "BOOTTIME", CLOCK_BOOTTIME }, +#endif { "MONOTONIC", CLOCK_MONOTONIC }, { NULL } };
tc/q_taprio.c +4 -0
@@ -35,8 +35,12 @@ static const struct static_clockid {clockid_t clockid; } clockids_sysv[] = { { "REALTIME", CLOCK_REALTIME }, +#ifdef CLOCK_TAI { "TAI", CLOCK_TAI }, +#endif +#ifdef CLOCK_BOOTTIME { "BOOTTIME", CLOCK_BOOTTIME }, +#endif { "MONOTONIC", CLOCK_MONOTONIC }, { NULL } };
Signature · 1 line
2.43.0