diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-02-18 12:14:28 -0500 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-02-18 12:14:28 -0500 |
commit | de70d4fb95e82ac4702ac3141d1bf34202f32d51 (patch) | |
tree | a2544ffbd3730aaa9b43c03d782504da7a3ef198 /src/unix.rs | |
parent | cda3f32b6ce5f2404bd80f878d1e03982aa3d749 (diff) |
fix libc constants to be referenced as libc::mode_t
Diffstat (limited to 'src/unix.rs')
-rw-r--r-- | src/unix.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/unix.rs b/src/unix.rs index 9e402d8..3150d93 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -27,8 +27,8 @@ pub fn get_unix_filetype(mode : u32) -> &'static str } */ -pub fn is_executable(mode: u32) -> bool { - const LIBC_PERMISSION_VALS: [u32; 3] = [libc::S_IXUSR, libc::S_IXGRP, libc::S_IXOTH]; +pub fn is_executable(mode: libc::mode_t) -> bool { + const LIBC_PERMISSION_VALS: [libc::mode_t; 3] = [libc::S_IXUSR, libc::S_IXGRP, libc::S_IXOTH]; for val in LIBC_PERMISSION_VALS.iter() { if mode & val != 0 { |