mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
mknod, stdbuf: fix build
This commit is contained in:
parent
2e7f969404
commit
26d6742c11
2 changed files with 4 additions and 10 deletions
|
@ -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 {
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue