Merge pull request #1111 from Arcterus/mode-to-uucore

mknod, stdbuf: fix build
This commit is contained in:
mpkh
2017-12-11 14:11:16 +04:00
committed by GitHub
2 changed files with 4 additions and 10 deletions
+2 -2
View File
@@ -8,9 +8,9 @@ pub fn parse_mode(mode: Option<String>) -> Result<mode_t, String> {
if let Some(mode) = mode {
let arr: &[char] = &['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
let result = if mode.contains(arr) {
mode::parse_numeric(fperm, mode.as_str())
mode::parse_numeric(fperm as u32, mode.as_str())
} else {
mode::parse_symbolic(fperm, mode.as_str(), true)
mode::parse_symbolic(fperm as u32, mode.as_str(), true)
};
result.map(|mode| mode as mode_t)
} else {
+2 -8
View File
@@ -52,14 +52,8 @@ fn main() {
}
link.arg("-o")
.arg(format!("{}/libstdbuf.{}", out_dir, platform::DYLIB_EXT))
.arg(format!("{}/libstdbuf.a", out_dir));
if platform::DYLIB_LINK_START.len() > 0 {
link.arg(platform::DYLIB_LINK_START);
}
link.arg(entry);
if platform::DYLIB_LINK_END.len() > 0 {
link.arg(platform::DYLIB_LINK_END);
}
.arg(format!("{}/libstdbuf.a", out_dir))
.arg(entry);
if !link.spawn().unwrap().wait().unwrap().success() {
panic!("linking failed");
}