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>
dev
Derek Foreman 10 years ago
parent e292694277
commit 32838c93a5
  1. 2
      clients/weston-info.c
  2. 2
      src/main.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))

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

Loading…
Cancel
Save