From 6fb1348765fef02b15ff6cea49f05875c90d39ad Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 16 Jan 2017 10:23:59 +1000 Subject: [PATCH] Revert "Remove the workaround for libevdev pre 1.3" I'm using semaphore CI for build testing and that only provides Ubuntu 14.04 which doesn't have libevdev 1.3 or later. Since this is a minor workaround for an error case only, revert the commit again and leave the handling in. Less effort than having to patch around it in semaphore. This reverts commit 1e0736daf3bc4c728a5bc8ecd1b55e25c67f1410. --- configure.ac | 2 +- test/litest.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a9155e0b..bae1c5b0 100644 --- a/configure.ac +++ b/configure.ac @@ -71,7 +71,7 @@ AC_CHECK_DECL(static_assert, [], PKG_PROG_PKG_CONFIG() PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0]) PKG_CHECK_MODULES(LIBUDEV, [libudev]) -PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 1.3]) +PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4]) AC_CHECK_LIB([m], [atan2]) AC_CHECK_LIB([rt], [clock_gettime]) diff --git a/test/litest.c b/test/litest.c index 3d5ada95..24baf816 100644 --- a/test/litest.c +++ b/test/litest.c @@ -2382,6 +2382,10 @@ litest_create_uinput(const char *name, rc = libevdev_uinput_create_from_device(dev, LIBEVDEV_UINPUT_OPEN_MANAGED, &uinput); + /* workaround for a bug in libevdev pre-1.3 + http://cgit.freedesktop.org/libevdev/commit/?id=debe9b030c8069cdf78307888ef3b65830b25122 */ + if (rc == -EBADF) + rc = -EACCES; litest_assert_msg(rc == 0, "Failed to create uinput device: %s", strerror(-rc)); libevdev_free(dev);