summaryrefslogtreecommitdiffstats
path: root/src/unix.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2019-03-02 17:40:15 -0500
committerJiayi Zhao <jeff.no.zhao@gmail.com>2019-03-02 17:40:15 -0500
commitd6e7cbd70841fa2c31181cb3d9588dcaf2a32ede (patch)
tree5e789a50d92605b46a62cfd12f86f9dfb4473068 /src/unix.rs
parent68e20a4c0b4696b605efea06dc3fabd8f7740349 (diff)
make some code less linux-specific
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 b819843..0fd2b8a 100644
--- a/src/unix.rs
+++ b/src/unix.rs
@@ -87,7 +87,7 @@ pub fn set_mode(path: &Path, mode: u32) {
if let Some(s) = os_path.to_str() {
let svec: Vec<i8> = s.bytes().map(|ch| ch as i8).collect();
unsafe {
- libc::chmod(svec.as_ptr(), mode);
+ libc::chmod(svec.as_ptr(), mode.into());
}
}
}