From 21f77442516b4fbb1b6e605189eb7537bdfc3179 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Mon, 26 Oct 2020 11:12:16 +0100 Subject: [PATCH] treewide: make linux v5.10 a hard requirement for libgpiod The library now uses v2 of the GPIO uAPI. The new user interface is scheduled for release as part of linux v5.10. Linux v5.10-rc1 is now tagged so make v5.10 headers a requirement for the build and update all tests to check for the correct version. Signed-off-by: Bartosz Golaszewski --- bindings/cxx/tests/gpiod-cxx-test.cpp | 2 +- bindings/python/tests/gpiod_py_test.py | 2 +- configure.ac | 4 ++-- tests/gpiod-test.c | 2 +- tests/mockup/gpio-mockup.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bindings/cxx/tests/gpiod-cxx-test.cpp b/bindings/cxx/tests/gpiod-cxx-test.cpp index fbff8ac..373ba10 100644 --- a/bindings/cxx/tests/gpiod-cxx-test.cpp +++ b/bindings/cxx/tests/gpiod-cxx-test.cpp @@ -54,6 +54,6 @@ public: kernel_checker& operator=(kernel_checker&& other) = delete; }; -kernel_checker require_kernel(5, 5, 0); +kernel_checker require_kernel(5, 10, 0); } /* namespace */ diff --git a/bindings/python/tests/gpiod_py_test.py b/bindings/python/tests/gpiod_py_test.py index 67ed66d..cb15fdc 100755 --- a/bindings/python/tests/gpiod_py_test.py +++ b/bindings/python/tests/gpiod_py_test.py @@ -964,6 +964,6 @@ class EventFileDescriptor(MockupTestCase): # if __name__ == '__main__': - check_kernel(5, 5, 0) + check_kernel(5, 10, 0) mockup = gpiomockup.Mockup() unittest.main() diff --git a/configure.ac b/configure.ac index 0301e12..57c99a8 100644 --- a/configure.ac +++ b/configure.ac @@ -98,11 +98,11 @@ AC_CHECK_HEADERS([linux/version.h], [], [HEADER_NOT_FOUND_LIB([linux/version.h]) AC_COMPILE_IFELSE([AC_LANG_SOURCE( #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0) #error #endif )], -[], [AC_MSG_ERROR(["libgpiod needs linux headers version >= v5.5.0"])]) +[], [AC_MSG_ERROR(["libgpiod needs linux headers version >= v5.10.0"])]) AC_ARG_ENABLE([tools], [AS_HELP_STRING([--enable-tools],[enable libgpiod command-line tools [default=no]])], diff --git a/tests/gpiod-test.c b/tests/gpiod-test.c index 0411623..343e836 100644 --- a/tests/gpiod-test.c +++ b/tests/gpiod-test.c @@ -16,7 +16,7 @@ #include "gpiod-test.h" #define MIN_KERNEL_MAJOR 5 -#define MIN_KERNEL_MINOR 5 +#define MIN_KERNEL_MINOR 10 #define MIN_KERNEL_RELEASE 0 #define MIN_KERNEL_VERSION KERNEL_VERSION(MIN_KERNEL_MAJOR, \ MIN_KERNEL_MINOR, \ diff --git a/tests/mockup/gpio-mockup.c b/tests/mockup/gpio-mockup.c index fa27bd7..5e85819 100644 --- a/tests/mockup/gpio-mockup.c +++ b/tests/mockup/gpio-mockup.c @@ -23,7 +23,7 @@ * The gpio-mockup features (including the debugfs interface) we're using * in this library have first been released in the linux kernel version below. */ -#define MIN_KERNEL_VERSION KERNEL_VERSION(5, 1, 0) +#define MIN_KERNEL_VERSION KERNEL_VERSION(5, 10, 0) struct gpio_mockup_chip { char *name; -- 2.30.2