testlibraw: build the CLOCK_MONOTONIC_RAW test conditionally

CLOCK_MONOTONIC_RAW is a somewhat recent addition, and some older
toolchains/kernels may not have the support for it. Therefore, we
build the part of the test that uses CLOCK_MONOTONIC_RAW only when
this definition is available.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
This commit is contained in:
Thomas Petazzoni 2016-02-12 10:18:08 +01:00 committed by Stefan Richter
parent 637359805c
commit 0ef8fab9e4
1 changed files with 2 additions and 0 deletions

View File

@ -211,6 +211,7 @@ read_cycle_timer(raw1394handle_t handle)
printf(" local time from CLOCK_MONOTONIC: %lld us\n",
(unsigned long long)local_time);
retval = raw1394_read_cycle_timer_and_clock(handle, &ct, &local_time,
if (retval < 0) {
@ -221,6 +222,7 @@ read_cycle_timer(raw1394handle_t handle)
ct >> 25, (ct >> 12) & 0x1fff, ct & 0xfff);
printf(" local time from CLOCK_MONOTONIC_RAW: %lld us\n",
(unsigned long long)local_time);
int test_card(int card)