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.
Over the last years, many fixes and changes have been applied to
Binder in the Linux kernel, but these fixes were never backported
to anbox-modules. The meant that the version of Binder in anbox-modules
was very outdated.
With this commit, Binder has been update to the latest state from
the Linux kernel. This should also fix the compile on kernel 5.12
and later.