summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2022-08-19 14:10:03 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-03 13:10:37 +0100
commite576212d25e7ab24599b8758aeab582df1dd3eee (patch)
tree6bfd0a4907833c78b5c1be62639c123996ecb883 /meta/recipes-kernel
parentb16301db9a720378679bbcada04d334df5ae005b (diff)
downloadpoky-e576212d25e7ab24599b8758aeab582df1dd3eee.tar.gz
cryptodev-module: fix build with 5.11+ kernels
Backport patch to fix: | cryptodev-module/1.10-r0/git/ioctl.c:875:4: error: implicit declaration of function 'ksys_close'; did you mean 'ksys_chown'? [-Werror=implicit-function-declaration] | 875 | ksys_close(fd); | | ^~~~~~~~~~ | | ksys_chown | cc1: some warnings being treated as errors (From OE-Core rev: 653b03aa6fc8effd3b2215a7a0ba005979e78e9f) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb1
-rw-r--r--meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch32
2 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb b/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb
index e4f7d1e372..d7c7918515 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb
+++ b/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb
@@ -11,6 +11,7 @@ SRC_URI += " \
11file://0001-Disable-installing-header-file-provided-by-another-p.patch \ 11file://0001-Disable-installing-header-file-provided-by-another-p.patch \
12file://0001-Fix-build-for-Linux-5.8-rc1.patch \ 12file://0001-Fix-build-for-Linux-5.8-rc1.patch \
13file://0001-Fix-build-for-Linux-5.9-rc1.patch \ 13file://0001-Fix-build-for-Linux-5.9-rc1.patch \
14file://fix-build-for-Linux-5.11-rc1.patch \
14" 15"
15 16
16EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' 17EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
diff --git a/meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch b/meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch
new file mode 100644
index 0000000000..3ae77cb9d6
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch
@@ -0,0 +1,32 @@
1From 55c6315058fc0dd189ffd116f2cc27ba4fa84cb6 Mon Sep 17 00:00:00 2001
2From: Joan Bruguera <joanbrugueram@gmail.com>
3Date: Mon, 28 Dec 2020 01:41:31 +0100
4Subject: [PATCH] Fix build for Linux 5.11-rc1
5
6ksys_close was removed, as far as I can tell, close_fd replaces it.
7
8See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8760c909f54a82aaa6e76da19afe798a0c77c3c3
9 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1572bfdf21d4d50e51941498ffe0b56c2289f783
10
11Upstream-Status: Backport [https://github.com/cryptodev-linux/cryptodev-linux/commit/55c6315058fc0dd189ffd116f2cc27ba4fa84cb6]
12Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
13---
14 ioctl.c | 4 +++-
15 1 file changed, 3 insertions(+), 1 deletion(-)
16
17diff --git a/ioctl.c b/ioctl.c
18index 3d332380..95481d4f 100644
19--- a/ioctl.c
20+++ b/ioctl.c
21@@ -871,8 +871,10 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_)
22 if (unlikely(ret)) {
23 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0))
24 sys_close(fd);
25-#else
26+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))
27 ksys_close(fd);
28+#else
29+ close_fd(fd);
30 #endif
31 return ret;
32 }