mirror of
https://github.com/choff/anbox-modules.git
synced 2026-07-02 19:30:11 +08:00
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.
This commit is contained in:
parent
17c83fd1d3
commit
fb109b5eec
@ -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;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
#include <linux/ipc_namespace.h>
|
#include <linux/ipc_namespace.h>
|
||||||
|
#include <linux/mm.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);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user