Fix types when compiling for Redox

This commit is contained in:
Jeremy Soller
2018-08-19 12:33:51 -06:00
parent 7f38ffac1f
commit 49b7a5f427
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -0,0 +1,6 @@
[dependencies.std]
features = ["panic_unwind", "backtrace"]
#[dependencies.test]
#stage = 1
+2 -2
View File
@@ -1,6 +1,6 @@
use Result;
use libc::chown;
use libc::{chown, gid_t, uid_t};
use std::io::{Error, Write};
use std::ffi::{CString, OsStr};
@@ -71,7 +71,7 @@ impl FileConfig {
// chown
let c_path = CString::new(path.as_os_str().as_bytes()).unwrap();
let ret = unsafe {
chown(c_path.as_ptr(), uid, gid)
chown(c_path.as_ptr(), uid as uid_t, gid as gid_t)
};
// credit to uutils
if ret == 0 {