From 32838c93a509dbeda717e58279683c63a34a2e07 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Mon, 29 Jun 2015 13:20:34 -0500 Subject: [PATCH] compositor/clients: Protect CLOCK_BOOTTIME with ifdefs CLOCK_BOOTTIME is a relatively new* feature that may not actually be present everywhere (I'm looking at you wheezy). Since our use of it is actually only cosmetic, I've just ifdef'd if. * No it isn't. Signed-off-by: Derek Foreman Reviewed-by: Giulio Camuffo --- clients/weston-info.c | 2 ++ src/main.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/clients/weston-info.c b/clients/weston-info.c index 89ef8f18e..f22781c2e 100644 --- a/clients/weston-info.c +++ b/clients/weston-info.c @@ -579,7 +579,9 @@ clock_name(clockid_t clk_id) [CLOCK_MONOTONIC_RAW] = "CLOCK_MONOTONIC_RAW", [CLOCK_REALTIME_COARSE] = "CLOCK_REALTIME_COARSE", [CLOCK_MONOTONIC_COARSE] = "CLOCK_MONOTONIC_COARSE", +#ifdef CLOCK_BOOTTIME [CLOCK_BOOTTIME] = "CLOCK_BOOTTIME", +#endif }; if (clk_id < 0 || (unsigned)clk_id >= ARRAY_LENGTH(names)) diff --git a/src/main.c b/src/main.c index 15910184e..329db1422 100644 --- a/src/main.c +++ b/src/main.c @@ -393,7 +393,9 @@ clock_name(clockid_t clk_id) [CLOCK_MONOTONIC_RAW] = "CLOCK_MONOTONIC_RAW", [CLOCK_REALTIME_COARSE] = "CLOCK_REALTIME_COARSE", [CLOCK_MONOTONIC_COARSE] = "CLOCK_MONOTONIC_COARSE", +#ifdef CLOCK_BOOTTIME [CLOCK_BOOTTIME] = "CLOCK_BOOTTIME", +#endif }; if (clk_id < 0 || (unsigned)clk_id >= ARRAY_LENGTH(names))