From fb109b5eec73cedfb7878759fec585424d92b4fd Mon Sep 17 00:00:00 2001 From: PEKKA Chang Date: Sun, 21 Jun 2026 15:20:27 +0800 Subject: [PATCH] binder: fix missing prototype for zap_page_range_single deps.c implements zap_page_range_single() as a runtime compat shim (resolved via kallsyms_lookup_name), but deps.h never declared its prototype, and binder_alloc.c did not include deps.h. Newer compilers (Clang, building with -std=gnu11 and later defaults) treat an implicit function declaration as a hard error rather than a warning, so the module fails to build: binder_alloc.c:1029:3: error: call to undeclared function 'zap_page_range_single'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] Declare the prototype in deps.h and include it from binder_alloc.c. Verified the module builds and links cleanly (binder_linux.ko) against kernel 7.1.1 with the fix applied; previously failed with the error above. --- binder/binder_alloc.c | 1 + binder/deps.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/binder/binder_alloc.c b/binder/binder_alloc.c index 6e43eca..45c2c56 100644 --- a/binder/binder_alloc.c +++ b/binder/binder_alloc.c @@ -27,6 +27,7 @@ #include "binder_alloc.h" #include "binder_trace.h" #include "compat_version.h" +#include "deps.h" struct list_lru binder_alloc_lru; diff --git a/binder/deps.h b/binder/deps.h index 771e268..9c62df8 100644 --- a/binder/deps.h +++ b/binder/deps.h @@ -1,5 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include struct ipc_namespace* get_init_ipc_ns_ptr(void); +void zap_page_range_single(struct vm_area_struct *vma, unsigned long address, + unsigned long size, struct zap_details *details);