summarylogtreecommitdiffstats
path: root/linux-6.patch
diff options
context:
space:
mode:
Diffstat (limited to 'linux-6.patch')
-rw-r--r--linux-6.patch40
1 files changed, 40 insertions, 0 deletions
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);
+ }