FreeBSD does not have CLOCK_MONOTONIC_RAW, instead use
CLOCK_MONOTONIC_FAST. This test checks that libevdev_set_clock_id()
fails when called with CLOCK_MONOTONIC_[RAW,FAST].
Signed-off-by: Niclas Zeising <zeising@daemonic.se>
{
struct uinput_device* uidev;
struct libevdev *dev;
+ int clockid;
int rc;
test_create_device(&uidev, &dev,
rc = libevdev_set_clock_id(dev, CLOCK_MONOTONIC);
ck_assert_int_eq(rc, 0);
- rc = libevdev_set_clock_id(dev, CLOCK_MONOTONIC_RAW);
+#ifdef __FreeBSD__
+ clockid = CLOCK_MONOTONIC_FAST;
+#else
+ clockid = CLOCK_MONOTONIC_RAW;
+#endif
+
+ rc = libevdev_set_clock_id(dev, clockid);
ck_assert_int_eq(rc, -EINVAL);
uinput_device_free(uidev);