blob: f2ae5e27a158e6b8889015395ac5f39ff914b449 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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);
}
|