1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

mknod, stdbuf: fix build

This commit is contained in:
Alex Lyon 2017-12-11 00:21:15 -08:00
parent 2e7f969404
commit 26d6742c11
No known key found for this signature in database
GPG key ID: B517F04B325131B1
2 changed files with 4 additions and 10 deletions

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 {

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");
}