about summary refs log tree commit diff
path: root/library/std/src/sys/unix/kernel_copy.rs
diff options
context:
space:
mode:
authormochaaP <git@mochaa.ws>2022-12-22 15:51:52 +0800
committermochaaP <git@mochaa.ws>2022-12-22 16:01:27 +0800
commit3e35b39d9dbfcd937c6b9163a3514d6a4775c198 (patch)
tree86f7e6b717e143582e45f548b1cc7ce1d7b7cddf /library/std/src/sys/unix/kernel_copy.rs
parent857488010837d296a4f3c0c5aadb3c0fa8494ff3 (diff)
downloadrust-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.rs4
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};