summaryrefslogtreecommitdiffstats
path: root/src/unix.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2019-05-31 14:21:56 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2019-05-31 14:21:56 -0400
commit6f1271f457d3201b269f99bc3c6571280f0f99e1 (patch)
treef8cfe23792a456d9b055afb46b85891caee8709e /src/unix.rs
parent134f485b8ec71f016afdefb2a33f2c6a6bc1f133 (diff)
fix type problem for libc on ppc
Diffstat (limited to 'src/unix.rs')
-rw-r--r--src/unix.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unix.rs b/src/unix.rs
index b543495..70e234b 100644
--- a/src/unix.rs
+++ b/src/unix.rs
@@ -60,7 +60,7 @@ pub fn stringify_mode(mode: u32) -> String {
pub fn set_mode(path: &Path, mode: u32) {
let os_path = path.as_os_str();
if let Some(s) = os_path.to_str() {
- let svec: Vec<i8> = s.bytes().map(|ch| ch as i8).collect();
+ let svec: Vec<libc::c_char> = s.bytes().map(|ch| ch as libc::c_char).collect();
unsafe {
libc::chmod(svec.as_ptr(), mode as libc::mode_t);
}