Skip to content

Commit 1738a3b

Browse files
committed
Add support for NetBSD
1 parent 239b9a0 commit 1738a3b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/base.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ use std::sync::Arc;
3939

4040
use libc::{uid_t, gid_t};
4141

42-
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd"))]
42+
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))]
4343
use libc::{c_char, time_t};
4444

4545
#[cfg(target_os = "linux")]
4646
use libc::c_char;
4747

4848

49-
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd"))]
49+
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))]
5050
#[repr(C)]
5151
pub struct c_passwd {
5252
pw_name: *const c_char, // user name
@@ -464,7 +464,7 @@ pub mod os {
464464
/// Although the `passwd` struct is common among Unix systems, its actual
465465
/// format can vary. See the definitions in the `base` module to check which
466466
/// fields are actually present.
467-
#[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd"))]
467+
#[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))]
468468
pub mod unix {
469469
use std::path::Path;
470470

@@ -598,7 +598,7 @@ pub mod os {
598598
///
599599
/// These platforms have `change` and `expire` fields in their `passwd`
600600
/// C structs.
601-
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd"))]
601+
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))]
602602
pub mod bsd {
603603
use std::path::Path;
604604
use libc::time_t;
@@ -683,15 +683,15 @@ pub mod os {
683683
}
684684

685685
/// Any extra fields on a `User` specific to the current platform.
686-
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd"))]
686+
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))]
687687
pub type UserExtras = bsd::UserExtras;
688688

689689
/// Any extra fields on a `User` specific to the current platform.
690690
#[cfg(any(target_os = "linux"))]
691691
pub type UserExtras = unix::UserExtras;
692692

693693
/// Any extra fields on a `Group` specific to the current platform.
694-
#[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd"))]
694+
#[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))]
695695
pub type GroupExtras = unix::GroupExtras;
696696
}
697697

0 commit comments

Comments
 (0)