From ec078155f140de8bd838596ac0d5d786d988d493 Mon Sep 17 00:00:00 2001 From: Ondrej Perutka Date: Wed, 16 Dec 2020 20:34:21 +0100 Subject: [PATCH] Fix failing build of std on armv5te-unknown-linux-uclibceabi due to missing cmsg_len_zero --- library/std/src/sys/unix/ext/net/ancillary.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/std/src/sys/unix/ext/net/ancillary.rs b/library/std/src/sys/unix/ext/net/ancillary.rs index 2c91ba70dd0..0964b6335aa 100644 --- a/library/std/src/sys/unix/ext/net/ancillary.rs +++ b/library/std/src/sys/unix/ext/net/ancillary.rs @@ -360,7 +360,11 @@ impl<'a> AncillaryData<'a> { fn try_from_cmsghdr(cmsg: &'a libc::cmsghdr) -> Result { 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",