about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorYannick Koehler <ykoehler@arubanetworks.com>2021-09-14 20:50:35 -0400
committerJonah Petri <jonah@petri.us>2021-10-06 14:33:13 +0000
commit11381a5a3a84ab1915d8c2a7ce369d4517c662a0 (patch)
tree7c81592c0d1b3b0a86378e14485259d8a8cae5a3 /library/std/src
parentd7539a6af09e5889ed9bcb8b49571b7a59c32e65 (diff)
downloadrust-11381a5a3a84ab1915d8c2a7ce369d4517c662a0.tar.gz
rust-11381a5a3a84ab1915d8c2a7ce369d4517c662a0.zip
Add new target armv7-unknown-linux-uclibceabihf
Co-authored-by: Jonah Petri <jonah@petri.us>
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/sys/unix/mod.rs3
-rw-r--r--library/std/src/sys/unix/process/process_unix.rs2
-rw-r--r--library/std/src/sys/unix/thread.rs3
3 files changed, 6 insertions, 2 deletions
diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
index 1c37f4ee498..2ba6c8d830e 100644
--- a/library/std/src/sys/unix/mod.rs
+++ b/library/std/src/sys/unix/mod.rs
@@ -307,6 +307,9 @@ cfg_if::cfg_if! {
         #[link(name = "zircon")]
         #[link(name = "fdio")]
         extern "C" {}
+    } else if #[cfg(all(target_os = "linux", target_env = "uclibc"))] {
+        #[link(name = "dl")]
+        extern "C" {}
     }
 }
 
diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs
index 99013efb495..ac852717f1e 100644
--- a/library/std/src/sys/unix/process/process_unix.rs
+++ b/library/std/src/sys/unix/process/process_unix.rs
@@ -419,7 +419,7 @@ impl Command {
         }
 
         // Only glibc 2.24+ posix_spawn() supports returning ENOENT directly.
-        #[cfg(all(target_os = "linux", target_env = "gnu"))]
+        #[cfg(all(target_os = "linux", any(target_env = "gnu", target_env = "uclibc")))]
         {
             if let Some(version) = sys::os::glibc_version() {
                 if version < (2, 24) {
diff --git a/library/std/src/sys/unix/thread.rs b/library/std/src/sys/unix/thread.rs
index 5631834eca6..01e54b4a8f1 100644
--- a/library/std/src/sys/unix/thread.rs
+++ b/library/std/src/sys/unix/thread.rs
@@ -594,7 +594,8 @@ pub mod guard {
                 Some(stackaddr - guardsize..stackaddr)
             } else if cfg!(all(target_os = "linux", target_env = "musl")) {
                 Some(stackaddr - guardsize..stackaddr)
-            } else if cfg!(all(target_os = "linux", target_env = "gnu")) {
+            } else if cfg!(all(target_os = "linux", any(target_env = "gnu", target_env = "uclibc")))
+            {
                 // glibc used to include the guard area within the stack, as noted in the BUGS
                 // section of `man pthread_attr_getguardsize`.  This has been corrected starting
                 // with glibc 2.27, and in some distro backports, so the guard is now placed at the