summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsickcodes2022-12-09 07:16:32 +0000
committersickcodes2022-12-09 07:16:32 +0000
commit631500b2592441f5fc4424346b53c6ec03579302 (patch)
treea2b59ad0f039578dfbbb393c22a688653c1665f7
parentaf4a4e74516a439e158a2e94bc892bb4b11a3fae (diff)
downloadaur-631500b2592441f5fc4424346b53c6ec03579302.tar.gz
Update to https://github.com/sickcodes/aur/commit/7f5e985bdb8867015c36c018de4f4582c4fcac24
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD8
-rw-r--r--linux-6.patch40
3 files changed, 48 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f593fd98ddbf..4e59a57f2f75 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -14,8 +14,10 @@ pkgbase = anbox-modules-dkms
source = git+https://github.com/choff/anbox-modules.git#commit=8148a162755bf5500a07cf41a65a02c8f3eb0af9
source = https://github.com/sickcodes/anbox-modules/commit/7c19d3c66758747d854c63e4c34ef127ce201fa6.patch
source = https://github.com/choff/anbox-modules/pull/4.patch
+ source = linux-6.patch
sha256sums = SKIP
sha256sums = 7589f311fd9a503c30a214b54f1f687c26a2f160d4339098c65f655e9b1e3556
sha256sums = fced11f849692dd1f0f36b50bb859d85aa244a536c2cef529a14bb73f568bb5e
+ sha256sums = SKIP
pkgname = anbox-modules-dkms
diff --git a/PKGBUILD b/PKGBUILD
index 443bafec234d..2f024f118203 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,10 +16,12 @@ depends=('dkms')
makedepends=('git')
source=("git+https://github.com/choff/${_pkgname}.git#commit=8148a162755bf5500a07cf41a65a02c8f3eb0af9"
"https://github.com/sickcodes/anbox-modules/commit/7c19d3c66758747d854c63e4c34ef127ce201fa6.patch"
- "https://github.com/choff/anbox-modules/pull/4.patch")
+ "https://github.com/choff/anbox-modules/pull/4.patch"
+ "linux-6.patch")
sha256sums=('SKIP'
'7589f311fd9a503c30a214b54f1f687c26a2f160d4339098c65f655e9b1e3556'
- 'fced11f849692dd1f0f36b50bb859d85aa244a536c2cef529a14bb73f568bb5e')
+ 'fced11f849692dd1f0f36b50bb859d85aa244a536c2cef529a14bb73f568bb5e'
+ 'SKIP')
conflicts=(anbox-modules-dkms-git)
prepare() {
@@ -31,6 +33,8 @@ prepare() {
# # Patch for 5.19
patch -p1 -i "${srcdir}"/4.patch
+ # # Patch for kernel 6.xx
+ patch --forward --strip=1 --input="${srcdir}/linux-6.patch"
}
package() {
diff --git a/linux-6.patch b/linux-6.patch
new file mode 100644
index 000000000000..f2ae5e27a158
--- /dev/null
+++ b/linux-6.patch
@@ -0,0 +1,40 @@
+diff --color --unified --recursive --text src/anbox-modules/ashmem/ashmem.c src-modified/anbox-modules/ashmem/ashmem.c
+--- anbox-modules/ashmem/ashmem.c 2022-10-15 23:50:53.701157821 -0300
++++ anbox-modules/ashmem/ashmem.c 2022-10-15 23:40:35.259339844 -0300
+@@ -874,7 +874,11 @@
+ return ret;
+ }
+
+- register_shrinker(&ashmem_shrinker);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
++ register_shrinker(&ashmem_shrinker, "ashmem");
++#else
++ register_shrinker(&ashmem_shrinker);
++#endif
+
+ return 0;
+ }
+diff --color --unified --recursive --text src/anbox-modules/binder/binder_alloc.c src-modified/anbox-modules/binder/binder_alloc.c
+--- anbox-modules/binder/binder_alloc.c 2022-10-15 23:50:53.714491337 -0300
++++ anbox-modules/binder/binder_alloc.c 2022-10-15 23:38:19.997484771 -0300
+@@ -23,6 +23,7 @@
+ #include <linux/uaccess.h>
+ #include <linux/highmem.h>
+ #include <linux/sizes.h>
++#include <linux/version.h>
+ #include "binder_alloc.h"
+ #include "binder_trace.h"
+
+@@ -1079,7 +1080,11 @@
+ int ret = list_lru_init(&binder_alloc_lru);
+
+ if (ret == 0) {
+- ret = register_shrinker(&binder_shrinker);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
++ ret = register_shrinker(&binder_shrinker, "binder");
++#else
++ ret = register_shrinker(&binder_shrinker);
++#endif
+ if (ret)
+ list_lru_destroy(&binder_alloc_lru);
+ }