diff options
| author | mochaaP <git@mochaa.ws> | 2022-12-22 15:51:52 +0800 |
|---|---|---|
| committer | mochaaP <git@mochaa.ws> | 2022-12-22 16:01:27 +0800 |
| commit | 3e35b39d9dbfcd937c6b9163a3514d6a4775c198 (patch) | |
| tree | 86f7e6b717e143582e45f548b1cc7ce1d7b7cddf /library/std/src/sys/unix/kernel_copy.rs | |
| parent | 857488010837d296a4f3c0c5aadb3c0fa8494ff3 (diff) | |
| download | rust-3e35b39d9dbfcd937c6b9163a3514d6a4775c198.tar.gz rust-3e35b39d9dbfcd937c6b9163a3514d6a4775c198.zip | |
std: only use LFS function on glibc
see #94173 and commit 27011b4185f5341e579d2a02cabd3dc7d7aa7149.
Diffstat (limited to 'library/std/src/sys/unix/kernel_copy.rs')
| -rw-r--r-- | library/std/src/sys/unix/kernel_copy.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/unix/kernel_copy.rs b/library/std/src/sys/unix/kernel_copy.rs index 6fa85e859c0..0f7107122b7 100644 --- a/library/std/src/sys/unix/kernel_copy.rs +++ b/library/std/src/sys/unix/kernel_copy.rs @@ -61,9 +61,9 @@ use crate::ptr; use crate::sync::atomic::{AtomicBool, AtomicU8, Ordering}; use crate::sys::cvt; use crate::sys::weak::syscall; -#[cfg(not(target_os = "linux"))] +#[cfg(not(all(target_os = "linux", target_env = "gnu")))] use libc::sendfile as sendfile64; -#[cfg(target_os = "linux")] +#[cfg(all(target_os = "linux", target_env = "gnu"))] use libc::sendfile64; use libc::{EBADF, EINVAL, ENOSYS, EOPNOTSUPP, EOVERFLOW, EPERM, EXDEV}; |
