Fix failing build of std on armv5te-unknown-linux-uclibceabi due to missing cmsg_len_zero

This commit is contained in:
Ondrej Perutka 2020-12-16 20:34:21 +01:00
parent ddbc6176de
commit ec078155f1
1 changed files with 5 additions and 1 deletions

View File

@ -360,7 +360,11 @@ impl<'a> AncillaryData<'a> {
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",