1 |
commit: 88139c57b784ecdc49c0e2936c8a5d001cf1c1c1 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 9 15:36:33 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 9 15:36:33 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88139c57 |
7 |
|
8 |
sys-power/acpi_call: support kernel >=5.13 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/801214 |
11 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
sys-power/acpi_call/acpi_call-1.2.1.ebuild | 2 ++ |
15 |
.../files/acpi_call-1.2.1-kernel-5.13.patch | 30 ++++++++++++++++++++++ |
16 |
2 files changed, 32 insertions(+) |
17 |
|
18 |
diff --git a/sys-power/acpi_call/acpi_call-1.2.1.ebuild b/sys-power/acpi_call/acpi_call-1.2.1.ebuild |
19 |
index 90e2e0158a0..418c4c459de 100644 |
20 |
--- a/sys-power/acpi_call/acpi_call-1.2.1.ebuild |
21 |
+++ b/sys-power/acpi_call/acpi_call-1.2.1.ebuild |
22 |
@@ -14,6 +14,8 @@ SLOT="0" |
23 |
KEYWORDS="amd64" |
24 |
IUSE="examples" |
25 |
|
26 |
+PATCHES=( "${FILESDIR}/${P}-kernel-5.13.patch" ) |
27 |
+ |
28 |
BUILD_TARGETS="default" |
29 |
CONFIG_CHECK="ACPI" |
30 |
MODULE_NAMES="acpi_call(misc:${S})" |
31 |
|
32 |
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 |
33 |
new file mode 100644 |
34 |
index 00000000000..786e639c03c |
35 |
--- /dev/null |
36 |
+++ b/sys-power/acpi_call/files/acpi_call-1.2.1-kernel-5.13.patch |
37 |
@@ -0,0 +1,30 @@ |
38 |
+From 48011f82726c263f49a2b9ca3d9f674bdb4cfd22 Mon Sep 17 00:00:00 2001 |
39 |
+From: Alexander Wetzel <alexander@×××××××××××.de> |
40 |
+Date: Thu, 8 Jul 2021 16:37:43 +0200 |
41 |
+Subject: [PATCH] Fix for 5.13+ kernels |
42 |
+ |
43 |
+Upstream commit d4455faccd6c ('proc: mandate ->proc_lseek |
44 |
+in "struct proc_ops"') made seek support for proc mandatory. |
45 |
+ |
46 |
+Not providing it will cause a null pointer exception for kernels |
47 |
+>=5.13.0 |
48 |
+ |
49 |
+Signed-off-by: Alexander Wetzel <alexander@×××××××××××.de> |
50 |
+--- |
51 |
+ acpi_call.c | 3 +++ |
52 |
+ 1 file changed, 3 insertions(+) |
53 |
+ |
54 |
+diff --git a/acpi_call.c b/acpi_call.c |
55 |
+index ebdda25..9fd9886 100644 |
56 |
+--- a/acpi_call.c |
57 |
++++ b/acpi_call.c |
58 |
+@@ -369,6 +369,9 @@ static ssize_t acpi_proc_read( struct file *filp, char __user *buff, |
59 |
+ static struct proc_ops proc_acpi_operations = { |
60 |
+ .proc_read = acpi_proc_read, |
61 |
+ .proc_write = acpi_proc_write, |
62 |
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) |
63 |
++ .proc_lseek = default_llseek, |
64 |
++#endif |
65 |
+ }; |
66 |
+ #else |
67 |
+ static struct file_operations proc_acpi_operations = { |