mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
mknod, stdbuf: fix build
This commit is contained in:
@@ -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
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user