diff options
| author | Joe Ellis <joe.ellis@arm.com> | 2020-09-08 16:08:21 +0100 |
|---|---|---|
| committer | Joe Ellis <joe.ellis@arm.com> | 2020-09-14 10:31:56 +0100 |
| commit | 72eef6168f2a5427ccd398a60db7ee56e419b393 (patch) | |
| tree | 2130098a491d2910874c09b69b0e469bedd33029 /library/std/src/sys/unix/ext/net.rs | |
| parent | fa697dfa8179b7f5c5a1207935828e3a938f2fea (diff) | |
| download | rust-72eef6168f2a5427ccd398a60db7ee56e419b393.tar.gz rust-72eef6168f2a5427ccd398a60db7ee56e419b393.zip | |
Conditionally compile peer credentials feature for supported platforms
Diffstat (limited to 'library/std/src/sys/unix/ext/net.rs')
| -rw-r--r-- | library/std/src/sys/unix/ext/net.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/ext/net.rs b/library/std/src/sys/unix/ext/net.rs index ac8d6cf53ff..f664a072c65 100644 --- a/library/std/src/sys/unix/ext/net.rs +++ b/library/std/src/sys/unix/ext/net.rs @@ -443,6 +443,15 @@ impl UnixStream { /// } /// ``` #[unstable(feature = "peer_credentials_unix_socket", issue = "42839", reason = "unstable")] + #[cfg(any( + target_os = "android", + target_os = "linux", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", + target_os = "macos", + target_os = "openbsd" + ))] pub fn peer_cred(&self) -> io::Result<UCred> { ucred::peer_cred(self) } |
