diff options
author | Conrad Kostecki <conikost@gentoo.org> | 2021-07-09 17:36:33 +0200 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2021-07-09 17:36:33 +0200 |
commit | 88139c57b784ecdc49c0e2936c8a5d001cf1c1c1 (patch) | |
tree | ac0e3834bf8c4da2a8af64501dcb92e2aaa75156 /sys-power/acpi_call | |
parent | dev-lua/lanes: drop old version (diff) | |
download | gentoo-88139c57b784ecdc49c0e2936c8a5d001cf1c1c1.tar.gz gentoo-88139c57b784ecdc49c0e2936c8a5d001cf1c1c1.tar.bz2 gentoo-88139c57b784ecdc49c0e2936c8a5d001cf1c1c1.zip |
sys-power/acpi_call: support kernel >=5.13
Closes: https://bugs.gentoo.org/801214
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'sys-power/acpi_call')
-rw-r--r-- | sys-power/acpi_call/acpi_call-1.2.1.ebuild | 2 | ||||
-rw-r--r-- | sys-power/acpi_call/files/acpi_call-1.2.1-kernel-5.13.patch | 30 |
2 files changed, 32 insertions, 0 deletions
diff --git a/sys-power/acpi_call/acpi_call-1.2.1.ebuild b/sys-power/acpi_call/acpi_call-1.2.1.ebuild index 90e2e0158a01..418c4c459dee 100644 --- a/sys-power/acpi_call/acpi_call-1.2.1.ebuild +++ b/sys-power/acpi_call/acpi_call-1.2.1.ebuild @@ -14,6 +14,8 @@ SLOT="0" KEYWORDS="amd64" IUSE="examples" +PATCHES=( "${FILESDIR}/${P}-kernel-5.13.patch" ) + BUILD_TARGETS="default" CONFIG_CHECK="ACPI" MODULE_NAMES="acpi_call(misc:${S})" diff --git a/sys-power/acpi_call/files/acpi_call-1.2.1-kernel-5.13.patch b/sys-power/acpi_call/files/acpi_call-1.2.1-kernel-5.13.patch new file mode 100644 index 000000000000..786e639c03ca --- /dev/null +++ b/sys-power/acpi_call/files/acpi_call-1.2.1-kernel-5.13.patch @@ -0,0 +1,30 @@ +From 48011f82726c263f49a2b9ca3d9f674bdb4cfd22 Mon Sep 17 00:00:00 2001 +From: Alexander Wetzel <alexander@wetzel-home.de> +Date: Thu, 8 Jul 2021 16:37:43 +0200 +Subject: [PATCH] Fix for 5.13+ kernels + +Upstream commit d4455faccd6c ('proc: mandate ->proc_lseek +in "struct proc_ops"') made seek support for proc mandatory. + +Not providing it will cause a null pointer exception for kernels +>=5.13.0 + +Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de> +--- + acpi_call.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/acpi_call.c b/acpi_call.c +index ebdda25..9fd9886 100644 +--- a/acpi_call.c ++++ b/acpi_call.c +@@ -369,6 +369,9 @@ static ssize_t acpi_proc_read( struct file *filp, char __user *buff, + static struct proc_ops proc_acpi_operations = { + .proc_read = acpi_proc_read, + .proc_write = acpi_proc_write, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) ++ .proc_lseek = default_llseek, ++#endif + }; + #else + static struct file_operations proc_acpi_operations = { |