mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 21:17:46 +00:00
Merge pull request #446 from ebfe/fix-build-master
Fix build with rust master
This commit is contained in:
commit
a5d70763bc
4 changed files with 7 additions and 7 deletions
|
@ -186,7 +186,7 @@ unsafe fn get_group_list_internal(name: *const c_char, gid: gid_t, groups: *mut
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_groups() -> Result<Vec<gid_t>, int> {
|
||||
pub fn get_groups() -> Result<Vec<gid_t>, uint> {
|
||||
let ngroups = unsafe { getgroups(0, null_mut()) };
|
||||
if ngroups == -1 {
|
||||
return Err(os::errno());
|
||||
|
@ -210,7 +210,7 @@ pub fn group(possible_pw: Option<c_passwd>, nflag: bool) {
|
|||
|
||||
match groups {
|
||||
Err(errno) =>
|
||||
crash!(1, "failed to get group list (errno={:d})", errno),
|
||||
crash!(1, "failed to get group list (errno={:u})", errno),
|
||||
Ok(groups) => {
|
||||
for &g in groups.iter() {
|
||||
if nflag {
|
||||
|
|
|
@ -325,7 +325,7 @@ Try '{} --help' for more information.", s, program);
|
|||
false => stat.fstat.unstable.blocks * 512,
|
||||
};
|
||||
if matches.opt_present("time") {
|
||||
let time_str = {
|
||||
let tm = {
|
||||
let (secs, nsecs) = {
|
||||
let time = match matches.opt_str("time") {
|
||||
Some(s) => match s.as_slice() {
|
||||
|
@ -344,10 +344,10 @@ Try '{} --help' for more information.", s, program);
|
|||
};
|
||||
((time / 1000) as i64, (time % 1000 * 1000000) as i32)
|
||||
};
|
||||
let time_spec = Timespec::new(secs, nsecs);
|
||||
time::at(time_spec).strftime(time_format_str)
|
||||
time::at(Timespec::new(secs, nsecs))
|
||||
};
|
||||
if !summarize || (summarize && index == len-1) {
|
||||
let time_str = tm.strftime(time_format_str).unwrap();
|
||||
print!("{}\t{}\t{}{}", convert_size(size), time_str, stat.path.display(), line_separator);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -345,7 +345,7 @@ fn id_print(possible_pw: Option<c_passwd>,
|
|||
};
|
||||
|
||||
let groups = groups.unwrap_or_else(|errno| {
|
||||
crash!(1, "failed to get group list (errno={:d})", errno);
|
||||
crash!(1, "failed to get group list (errno={:u})", errno);
|
||||
});
|
||||
|
||||
if possible_pw.is_some() {
|
||||
|
|
|
@ -69,7 +69,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
|||
f.with_c_str(|name| {
|
||||
let err = unsafe { mkfifo(name, mode) };
|
||||
if err == -1 {
|
||||
show_error!("creating '{}': {}", f, os::error_string(os::errno() as uint));
|
||||
show_error!("creating '{}': {}", f, os::error_string(os::errno()));
|
||||
exit_status = 1;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue