parent
40ea93f75e
commit
35e9dd484d
@ -0,0 +1,84 @@
|
||||
From 4f64fe52b50af7f79a59eb89f8bfd4983dce5ea3 Mon Sep 17 00:00:00 2001
|
||||
From: tigro <tigro@msvsphere-os.ru>
|
||||
Date: Sat, 18 Nov 2023 22:59:08 +0300
|
||||
Subject: [PATCH] Fix build on RedHat 9.3 kernel
|
||||
|
||||
---
|
||||
ashmem/ashmem.c | 2 +-
|
||||
binder/binder.c | 2 +-
|
||||
binder/binder_alloc.c | 2 +-
|
||||
binder/deps.c | 6 +++---
|
||||
4 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/ashmem/ashmem.c b/ashmem/ashmem.c
|
||||
index 9c38c9e..5589bfd 100644
|
||||
--- a/ashmem/ashmem.c
|
||||
+++ b/ashmem/ashmem.c
|
||||
@@ -874,7 +874,7 @@ static int __init ashmem_init(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
|
||||
register_shrinker(&ashmem_shrinker, "android-ashmem");
|
||||
#else
|
||||
register_shrinker(&ashmem_shrinker);
|
||||
diff --git a/binder/binder.c b/binder/binder.c
|
||||
index 99f47c3..45aa600 100644
|
||||
--- a/binder/binder.c
|
||||
+++ b/binder/binder.c
|
||||
@@ -2236,7 +2236,7 @@ static void binder_deferred_fd_close(int fd)
|
||||
if (!twcb)
|
||||
return;
|
||||
init_task_work(&twcb->twork, binder_do_fd_close);
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
|
||||
twcb->file = close_fd_get_file(fd);
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
|
||||
close_fd_get_file(fd, &twcb->file);
|
||||
diff --git a/binder/binder_alloc.c b/binder/binder_alloc.c
|
||||
index 13b8b32..350edb5 100644
|
||||
--- a/binder/binder_alloc.c
|
||||
+++ b/binder/binder_alloc.c
|
||||
@@ -1084,7 +1084,7 @@ int binder_alloc_shrinker_init(void)
|
||||
int ret = list_lru_init(&binder_alloc_lru);
|
||||
|
||||
if (ret == 0) {
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
|
||||
ret = register_shrinker(&binder_shrinker, "android-binder");
|
||||
#else
|
||||
ret = register_shrinker(&binder_shrinker);
|
||||
diff --git a/binder/deps.c b/binder/deps.c
|
||||
index 232bded..95b896a 100644
|
||||
--- a/binder/deps.c
|
||||
+++ b/binder/deps.c
|
||||
@@ -70,14 +70,14 @@ static unsigned long kallsyms_lookup_name_wrapper(const char *name)
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
|
||||
static struct file *(*close_fd_get_file_ptr)(unsigned int fd)
|
||||
#else
|
||||
static int (*close_fd_get_file_ptr)(unsigned int fd, struct file **res)
|
||||
#endif
|
||||
= NULL;
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
|
||||
struct file *close_fd_get_file(unsigned int fd)
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
|
||||
int close_fd_get_file(unsigned int fd, struct file **res)
|
||||
@@ -92,7 +92,7 @@ int __close_fd_get_file(unsigned int fd, struct file **res)
|
||||
close_fd_get_file_ptr = kallsyms_lookup_name_wrapper("__close_fd_get_file");
|
||||
#endif
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
|
||||
return close_fd_get_file_ptr(fd);
|
||||
#else
|
||||
return close_fd_get_file_ptr(fd, res);
|
||||
--
|
||||
2.41.0
|
||||
|
Loading…
Reference in new issue