From e7edf2f55b7eb71b69984110f3c8e31b8ac6285e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Fri, 5 Aug 2022 18:42:22 +0200 Subject: [PATCH] Backported dkms-patch from Ubuntu Closes: https://github.com/umlaeute/v4l2loopback/issues/498 --- dkms.conf | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dkms.conf b/dkms.conf index f697db2b..7d5ed75c 100644 --- a/dkms.conf +++ b/dkms.conf @@ -3,8 +3,15 @@ PACKAGE_VERSION="0.12.7" if [ -f $kernel_source_dir/.config ]; then . $kernel_source_dir/.config - if [ "${CONFIG_VIDEO_V4L2:-n}" = "n" ]; then - BUILD_EXCLUSIVE_KERNEL="REQUIRES CONFIG_VIDEO_V4L2" + if ! { echo "$kernelver"; echo 5.18; } | sort -V -C; then + # for linux>=5.18, CONFIG_VIDEO_V4L2 has been renamed to CONFIG_VIDEO_DEV + if [ "${CONFIG_VIDEO_DEV:-n}" = "n" ]; then + BUILD_EXCLUSIVE_KERNEL="REQUIRES CONFIG_VIDEO_DEV" + fi + else + if [ "${CONFIG_VIDEO_V4L2:-n}" = "n" ]; then + BUILD_EXCLUSIVE_KERNEL="REQUIRES CONFIG_VIDEO_V4L2" + fi fi fi