diff --git a/src/uucore/src/lib/features/entries.rs b/src/uucore/src/lib/features/entries.rs index fa10ba2de..e2cbafa59 100644 --- a/src/uucore/src/lib/features/entries.rs +++ b/src/uucore/src/lib/features/entries.rs @@ -124,7 +124,7 @@ pub fn get_groups_gnu(arg_id: Option) -> IOResult> { Ok(sort_groups(groups, egid)) } -#[cfg(all(unix, feature = "process"))] +#[cfg(all(unix, not(target_os = "redox"), feature = "process"))] fn sort_groups(mut groups: Vec, egid: gid_t) -> Vec { if let Some(index) = groups.iter().position(|&x| x == egid) { groups[..=index].rotate_right(1); diff --git a/src/uucore/src/lib/features/fsext.rs b/src/uucore/src/lib/features/fsext.rs index d02d74bab..a49b1e536 100644 --- a/src/uucore/src/lib/features/fsext.rs +++ b/src/uucore/src/lib/features/fsext.rs @@ -14,7 +14,7 @@ use time::UtcOffset; const LINUX_MTAB: &str = "/etc/mtab"; #[cfg(any(target_os = "linux", target_os = "android"))] const LINUX_MOUNTINFO: &str = "/proc/self/mountinfo"; -#[cfg(unix)] +#[cfg(all(unix, not(target_os = "redox")))] static MOUNT_OPT_BIND: &str = "bind"; #[cfg(windows)] const MAX_PATH: usize = 266; @@ -318,7 +318,7 @@ impl From for MountInfo { } } -#[cfg(unix)] +#[cfg(all(unix, not(target_os = "redox")))] fn is_dummy_filesystem(fs_type: &str, mount_option: &str) -> bool { // spell-checker:disable match fs_type { @@ -337,14 +337,14 @@ fn is_dummy_filesystem(fs_type: &str, mount_option: &str) -> bool { // spell-checker:enable } -#[cfg(unix)] +#[cfg(all(unix, not(target_os = "redox")))] fn is_remote_filesystem(dev_name: &str, fs_type: &str) -> bool { dev_name.find(':').is_some() || (dev_name.starts_with("//") && fs_type == "smbfs" || fs_type == "cifs") || dev_name == "-hosts" } -#[cfg(unix)] +#[cfg(all(unix, not(target_os = "redox")))] fn mount_dev_id(mount_dir: &str) -> String { use std::os::unix::fs::MetadataExt;