Skip to content

Commit 0ded6ad

Browse files
committed
Auto merge of #87430 - devnexen:netbsd_ucred_enabled, r=joshtriplett
netbsd enabled ucred
2 parents 5782f01 + 42adaab commit 0ded6ad

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

library/std/src/os/unix/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ pub mod thread;
8282
target_os = "freebsd",
8383
target_os = "ios",
8484
target_os = "macos",
85+
target_os = "netbsd",
8586
target_os = "openbsd"
8687
))]
8788
pub mod ucred;

library/std/src/os/unix/net/stream.rs

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
2121
target_os = "freebsd",
2222
target_os = "ios",
2323
target_os = "macos",
24+
target_os = "netbsd",
2425
target_os = "openbsd"
2526
))]
2627
use crate::os::unix::ucred;
@@ -38,6 +39,7 @@ use crate::time::Duration;
3839
target_os = "freebsd",
3940
target_os = "ios",
4041
target_os = "macos",
42+
target_os = "netbsd",
4143
target_os = "openbsd"
4244
))]
4345
pub use ucred::UCred;
@@ -208,6 +210,7 @@ impl UnixStream {
208210
target_os = "freebsd",
209211
target_os = "ios",
210212
target_os = "macos",
213+
target_os = "netbsd",
211214
target_os = "openbsd"
212215
))]
213216
pub fn peer_cred(&self) -> io::Result<UCred> {

library/std/src/os/unix/ucred.rs

+12-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ pub struct UCred {
2828
#[cfg(any(target_os = "android", target_os = "linux"))]
2929
pub use self::impl_linux::peer_cred;
3030

31-
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
31+
#[cfg(any(
32+
target_os = "dragonfly",
33+
target_os = "freebsd",
34+
target_os = "openbsd",
35+
target_os = "netbsd"
36+
))]
3237
pub use self::impl_bsd::peer_cred;
3338

3439
#[cfg(any(target_os = "macos", target_os = "ios",))]
@@ -70,7 +75,12 @@ pub mod impl_linux {
7075
}
7176
}
7277

73-
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
78+
#[cfg(any(
79+
target_os = "dragonfly",
80+
target_os = "freebsd",
81+
target_os = "openbsd",
82+
target_os = "netbsd"
83+
))]
7484
pub mod impl_bsd {
7585
use super::UCred;
7686
use crate::io;

0 commit comments

Comments
 (0)