From 2471197fd7b9469f397d0d10d6701f171ff44cfc Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Wed, 4 Dec 2024 17:46:25 +0100 Subject: [PATCH] Fix build failure of uds tests on android (#1847) Android provides SocketAddrExt at a different path than other Linuxes, so from_abstract_name needs to be imported differently. This mirrors the imports at the top of the file. --- src/sys/unix/uds/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sys/unix/uds/mod.rs b/src/sys/unix/uds/mod.rs index 7a1a91de5..0c61db94a 100644 --- a/src/sys/unix/uds/mod.rs +++ b/src/sys/unix/uds/mod.rs @@ -158,6 +158,9 @@ mod tests { #[test] #[cfg(any(target_os = "android", target_os = "linux"))] fn abstract_address() { + #[cfg(target_os = "android")] + use std::os::android::net::SocketAddrExt; + #[cfg(target_os = "linux")] use std::os::linux::net::SocketAddrExt; const PATH: &[u8] = &[0, 116, 111, 107, 105, 111];