Skip to content

Commit

Permalink
Fix build failure of uds tests on android (#1847)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Darksonn authored Dec 4, 2024
1 parent 54e4397 commit 2471197
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sys/unix/uds/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 2471197

Please sign in to comment.