Skip to content

Commit 1d8f191

Browse files
authored
Merge branch 'rust-lang:master' into must-use-alloc-constructors
2 parents 5957ebb + 21303f5 commit 1d8f191

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

std/src/sys/unix/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ cfg_if::cfg_if! {
307307
#[link(name = "zircon")]
308308
#[link(name = "fdio")]
309309
extern "C" {}
310+
} else if #[cfg(all(target_os = "linux", target_env = "uclibc"))] {
311+
#[link(name = "dl")]
312+
extern "C" {}
310313
}
311314
}
312315

std/src/sys/unix/thread.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,8 @@ pub mod guard {
594594
Some(stackaddr - guardsize..stackaddr)
595595
} else if cfg!(all(target_os = "linux", target_env = "musl")) {
596596
Some(stackaddr - guardsize..stackaddr)
597-
} else if cfg!(all(target_os = "linux", target_env = "gnu")) {
597+
} else if cfg!(all(target_os = "linux", any(target_env = "gnu", target_env = "uclibc")))
598+
{
598599
// glibc used to include the guard area within the stack, as noted in the BUGS
599600
// section of `man pthread_attr_getguardsize`. This has been corrected starting
600601
// with glibc 2.27, and in some distro backports, so the guard is now placed at the

unwind/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ cfg_if::cfg_if! {
6363
// don't want to duplicate it here.
6464
#[cfg(all(
6565
target_os = "linux",
66-
target_env = "gnu",
66+
any(target_env = "gnu", target_env = "uclibc"),
6767
not(feature = "llvm-libunwind"),
6868
not(feature = "system-llvm-libunwind")
6969
))]
@@ -72,7 +72,7 @@ extern "C" {}
7272

7373
#[cfg(all(
7474
target_os = "linux",
75-
target_env = "gnu",
75+
any(target_env = "gnu", target_env = "uclibc"),
7676
not(feature = "llvm-libunwind"),
7777
feature = "system-llvm-libunwind"
7878
))]

0 commit comments

Comments
 (0)