From 3e35b39d9dbfcd937c6b9163a3514d6a4775c198 Mon Sep 17 00:00:00 2001 From: mochaaP Date: Thu, 22 Dec 2022 15:51:52 +0800 Subject: std: only use LFS function on glibc see #94173 and commit 27011b4185f5341e579d2a02cabd3dc7d7aa7149. --- library/std/src/sys/unix/stack_overflow.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'library/std/src/sys/unix/stack_overflow.rs') diff --git a/library/std/src/sys/unix/stack_overflow.rs b/library/std/src/sys/unix/stack_overflow.rs index 957e086798f..b59d4ba26af 100644 --- a/library/std/src/sys/unix/stack_overflow.rs +++ b/library/std/src/sys/unix/stack_overflow.rs @@ -45,9 +45,9 @@ mod imp { use crate::thread; use libc::MAP_FAILED; - #[cfg(not(target_os = "linux"))] + #[cfg(not(all(target_os = "linux", target_env = "gnu")))] use libc::{mmap as mmap64, munmap}; - #[cfg(target_os = "linux")] + #[cfg(all(target_os = "linux", target_env = "gnu"))] use libc::{mmap64, munmap}; use libc::{sigaction, sighandler_t, SA_ONSTACK, SA_SIGINFO, SIGBUS, SIG_DFL}; use libc::{sigaltstack, SIGSTKSZ, SS_DISABLE}; -- cgit 1.4.1-3-g733a5