From 1837900e780409f78928559729929d1f27b30339 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 26 Apr 2023 11:18:11 -0600 Subject: [PATCH] Add Redox support --- src/base.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/base.rs b/src/base.rs index ece499a..f82406b 100644 --- a/src/base.rs +++ b/src/base.rs @@ -923,7 +923,7 @@ pub mod os { /// Although the `passwd` struct is common among Unix systems, its actual /// format can vary. See the definitions in the `base` module to check which /// fields are actually present. - #[cfg(any(target_os = "linux", target_os = "android", target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "solaris"))] + #[cfg(any(target_os = "linux", target_os = "android", target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "redox", target_os = "solaris"))] pub mod unix { use std::ffi::{OsStr, OsString}; use std::path::{Path, PathBuf}; @@ -1012,10 +1012,10 @@ pub mod os { } } - #[cfg(any(target_os = "linux", target_os = "android", target_os = "solaris"))] + #[cfg(any(target_os = "linux", target_os = "android", target_os = "redox", target_os = "solaris"))] use super::super::User; - #[cfg(any(target_os = "linux", target_os = "android", target_os = "solaris"))] + #[cfg(any(target_os = "linux", target_os = "android", target_os = "redox", target_os = "solaris"))] impl UserExt for User { fn home_dir(&self) -> &Path { Path::new(&self.extras.home_dir) @@ -1176,11 +1176,11 @@ pub mod os { pub type UserExtras = bsd::UserExtras; /// Any extra fields on a `User` specific to the current platform. - #[cfg(any(target_os = "linux", target_os = "android", target_os = "solaris"))] + #[cfg(any(target_os = "linux", target_os = "android", target_os = "redox", target_os = "solaris"))] pub type UserExtras = unix::UserExtras; /// Any extra fields on a `Group` specific to the current platform. - #[cfg(any(target_os = "linux", target_os = "android", target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "solaris"))] + #[cfg(any(target_os = "linux", target_os = "android", target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "redox", target_os = "solaris"))] pub type GroupExtras = unix::GroupExtras; }