Skip to content

fix(fs): Enable sendfile on Android - #1688

Open
reigadegr wants to merge 1 commit into
bytecodealliance:mainfrom
reigadegr:main
Open

reigadegr wants to merge 1 commit into
bytecodealliance:mainfrom
reigadegr:main

Conversation

@reigadegr

Copy link
Copy Markdown

The sendfile function, its module declaration, and its re-export were gated on target_os = "linux", which excludes Android. Since Android uses the Linux kernel and its bionic libc provides sendfile64, these should be gated on linux_kernel instead.

The `sendfile` function, its module declaration, and its re-export
were gated on `target_os = "linux"`, which excludes Android. Since
Android uses the Linux kernel and its bionic libc provides
`sendfile64`, these should be gated on `linux_kernel` instead.

This is consistent with the rest of the codebase (e.g. `copy_file_range`,
`raw_dir`, `statx`, `ioctl` all use `linux_kernel`) and with
`sendfile.rs` itself, which already uses `#[cfg(linux_kernel)]` on the
public function. The mismatch meant the module was never compiled on
Android despite the function being correctly gated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant