diff options
| author | Nicholas Rishel <nick@accups.com> | 2018-02-16 15:41:24 -0500 |
|---|---|---|
| committer | Nicholas Rishel <nick@accups.com> | 2018-04-19 15:55:02 -0400 |
| commit | c7f3621f0e9e6ca617ff5debc634e1e16d0a662f (patch) | |
| tree | f9cae5115d36008459d02b30b0c5e0ef3e9e54ab /src/libstd/sys | |
| parent | 8a28d94ea1b6c19b7e1d41ef9b33ccb73951f654 (diff) | |
| download | rust-c7f3621f0e9e6ca617ff5debc634e1e16d0a662f.tar.gz rust-c7f3621f0e9e6ca617ff5debc634e1e16d0a662f.zip | |
The prior check causes abstract unix domain sockets to return unnamed on Android.
Signed-off-by: Nicholas Rishel <nick@accups.com>
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/ext/net.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/ext/net.rs b/src/libstd/sys/unix/ext/net.rs index ba80cbe47c8..2010b0218db 100644 --- a/src/libstd/sys/unix/ext/net.rs +++ b/src/libstd/sys/unix/ext/net.rs @@ -214,7 +214,7 @@ impl SocketAddr { let path = unsafe { mem::transmute::<&[libc::c_char], &[u8]>(&self.addr.sun_path) }; // macOS seems to return a len of 16 and a zeroed sun_path for unnamed addresses - if len == 0 || (cfg!(not(target_os = "linux")) && self.addr.sun_path[0] == 0) { + if len == 0 || (cfg!(not(any(target_os = "linux", target_os = "android"))) && self.addr.sun_path[0] == 0) { AddressKind::Unnamed } else if self.addr.sun_path[0] == 0 { AddressKind::Abstract(&path[1..len]) |
