diff options
author | Tom Dryer <tomdryer.com@gmail.com> | 2021-05-28 16:04:44 -0700 |
---|---|---|
committer | Tom Dryer <tomdryer.com@gmail.com> | 2021-05-28 16:04:44 -0700 |
commit | 65ab8d7fca183773465cfa6bde4014c326ac55be (patch) | |
tree | b3b4bba7bb1f8c5301f3aa2445130899e93c5b73 | |
parent | 81c9e2d9a84ff8c5d147c321d0a48249891bb1ea (diff) | |
download | nix-65ab8d7fca183773465cfa6bde4014c326ac55be.zip |
Disable sendfile64 on android
It's not available from libc on that platform.
-rw-r--r-- | src/sys/sendfile.rs | 2 | ||||
-rw-r--r-- | test/test_sendfile.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/sys/sendfile.rs b/src/sys/sendfile.rs index 0f64749a..a12c0411 100644 --- a/src/sys/sendfile.rs +++ b/src/sys/sendfile.rs @@ -45,7 +45,7 @@ pub fn sendfile( /// `in_fd` must support `mmap`-like operations and therefore cannot be a socket. /// /// For more information, see [the sendfile(2) man page.](https://man7.org/linux/man-pages/man2/sendfile.2.html) -#[cfg(any(target_os = "android", target_os = "linux"))] +#[cfg(target_os = "linux")] pub fn sendfile64( out_fd: RawFd, in_fd: RawFd, diff --git a/test/test_sendfile.rs b/test/test_sendfile.rs index ef8031aa..b6559d32 100644 --- a/test/test_sendfile.rs +++ b/test/test_sendfile.rs @@ -36,7 +36,7 @@ fn test_sendfile_linux() { close(wr).unwrap(); } -#[cfg(any(target_os = "android", target_os = "linux"))] +#[cfg(target_os = "linux")] #[test] fn test_sendfile64_linux() { const CONTENTS: &[u8] = b"abcdef123456"; |