]> git.lizzy.rs Git - rust.git/commitdiff
Fix failing build of std on armv5te-unknown-linux-uclibceabi due to missing cmsg_len_zero
authorOndrej Perutka <perutka.ondrej@gmail.com>
Wed, 16 Dec 2020 19:34:21 +0000 (20:34 +0100)
committerOndrej Perutka <perutka.ondrej@gmail.com>
Wed, 16 Dec 2020 19:34:21 +0000 (20:34 +0100)
library/std/src/sys/unix/ext/net/ancillary.rs

index 2c91ba70dd0b5c16aa43f2a779b66086356ed223..0964b6335aa7929722b8157288d55489fc767e18 100644 (file)
@@ -360,7 +360,11 @@ unsafe fn as_credentials(data: &'a [u8]) -> Self {
     fn try_from_cmsghdr(cmsg: &'a libc::cmsghdr) -> Result<Self, AncillaryError> {
         unsafe {
             cfg_if::cfg_if! {
-                if #[cfg(any(target_os = "android", all(target_os = "linux", target_env = "gnu")))] {
+                if #[cfg(any(
+                        target_os = "android",
+                        all(target_os = "linux", target_env = "gnu"),
+                        all(target_os = "linux", target_env = "uclibc"),
+                   ))] {
                     let cmsg_len_zero = libc::CMSG_LEN(0) as libc::size_t;
                 } else if #[cfg(any(
                               target_os = "dragonfly",