anbox-modules/binder/deps.h
PEKKA Chang fb109b5eec 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-06-21 15:20:27 +08:00

9 lines
277 B
C

// SPDX-License-Identifier: GPL-2.0
#include <linux/ipc_namespace.h>
#include <linux/mm.h>
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);