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 <derekf@osg.samsung.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
This commit is contained in:
Derek Foreman 2015-06-29 13:20:34 -05:00
parent e292694277
commit 32838c93a5
2 changed files with 4 additions and 0 deletions

View File

@ -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))

View File

@ -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))