RedoxOS support.

This commit is contained in:
Jose Narvaez 2017-10-18 22:57:59 +01:00 committed by David Peter
parent d2d2c31307
commit 715b07599b
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ use std::{fs, process};
use std::io::{self, Write};
use std::ops::Deref;
use std::path::{self, Path, PathBuf, Component};
#[cfg(unix)]
#[cfg(any(unix, target_os = "redox"))]
use std::os::unix::fs::PermissionsExt;
use ansi_term;
@ -102,7 +102,7 @@ fn get_path_style<'a>(path: &Path, ls_colors: &'a LsColors) -> Option<&'a ansi_t
}
}
#[cfg(unix)]
#[cfg(any(unix, target_os = "redox"))]
fn is_executable(md: &fs::Metadata) -> bool {
md.permissions().mode() & 0o111 != 0
}