Compare commits

..

2 Commits

Author SHA1 Message Date
PEKKA Chang
3f65f66a87 Fix: remove the redundant header inclusion 2026-07-07 21:27:36 +02:00
PEKKA Chang
9878e65450 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.
2026-07-07 21:27:36 +02:00
2 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,7 @@
#include "binder_alloc.h" #include "binder_alloc.h"
#include "binder_trace.h" #include "binder_trace.h"
#include "compat_version.h" #include "compat_version.h"
#include "deps.h"
struct list_lru binder_alloc_lru; struct list_lru binder_alloc_lru;

View File

@ -3,3 +3,5 @@
#include <linux/ipc_namespace.h> #include <linux/ipc_namespace.h>
struct ipc_namespace* get_init_ipc_ns_ptr(void); 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);