summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--src/file.rs44
2 files changed, 22 insertions, 24 deletions
diff --git a/.travis.yml b/.travis.yml
index b4aff79..5c9d7f5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,8 +5,6 @@ before_install:
sudo: true
language: rust
rust:
- - nightly
- - beta
- stable
script:
- cargo build --verbose
diff --git a/src/file.rs b/src/file.rs
index 53265d7..ac3c996 100644
--- a/src/file.rs
+++ b/src/file.rs
@@ -17,27 +17,27 @@ use self::fields as f;
/// see https://github.com/rust-lang/rust/issues/27712
#[allow(dead_code)]
mod modes {
- use std::os::unix::raw;
-
- pub const USER_READ: raw::mode_t = 0o400;
- pub const USER_WRITE: raw::mode_t = 0o200;
- pub const USER_EXECUTE: raw::mode_t = 0o100;
- pub const USER_RWX: raw::mode_t = 0o700;
- pub const GROUP_READ: raw::mode_t = 0o040;
- pub const GROUP_WRITE: raw::mode_t = 0o020;
- pub const GROUP_EXECUTE: raw::mode_t = 0o010;
- pub const GROUP_RWX: raw::mode_t = 0o070;
- pub const OTHER_READ: raw::mode_t = 0o004;
- pub const OTHER_WRITE: raw::mode_t = 0o002;
- pub const OTHER_EXECUTE: raw::mode_t = 0o001;
- pub const OTHER_RWX: raw::mode_t = 0o007;
- pub const ALL_READ: raw::mode_t = 0o444;
- pub const ALL_WRITE: raw::mode_t = 0o222;
- pub const ALL_EXECUTE: raw::mode_t = 0o111;
- pub const ALL_RWX: raw::mode_t = 0o777;
- pub const SETUID: raw::mode_t = 0o4000;
- pub const SETGID: raw::mode_t = 0o2000;
- pub const STICKY_BIT: raw::mode_t = 0o1000;
+ use libc::mode_t;
+
+ pub const USER_READ: mode_t = 0o400;
+ pub const USER_WRITE: mode_t = 0o200;
+ pub const USER_EXECUTE: mode_t = 0o100;
+ pub const USER_RWX: mode_t = 0o700;
+ pub const GROUP_READ: mode_t = 0o040;
+ pub const GROUP_WRITE: mode_t = 0o020;
+ pub const GROUP_EXECUTE: mode_t = 0o010;
+ pub const GROUP_RWX: mode_t = 0o070;
+ pub const OTHER_READ: mode_t = 0o004;
+ pub const OTHER_WRITE: mode_t = 0o002;
+ pub const OTHER_EXECUTE: mode_t = 0o001;
+ pub const OTHER_RWX: mode_t = 0o007;
+ pub const ALL_READ: mode_t = 0o444;
+ pub const ALL_WRITE: mode_t = 0o222;
+ pub const ALL_EXECUTE: mode_t = 0o111;
+ pub const ALL_RWX: mode_t = 0o777;
+ pub const SETUID: mode_t = 0o4000;
+ pub const SETGID: mode_t = 0o2000;
+ pub const STICKY_BIT: mode_t = 0o1000;
}
@@ -432,7 +432,7 @@ fn ext(name: &str) -> Option<String> {
/// return an object in this `fields` module. These objects are later rendered
/// into formatted strings in the `output/details` module.
pub mod fields {
- use std::os::unix::raw::{blkcnt_t, gid_t, ino_t, nlink_t, time_t, uid_t};
+ use libc::{blkcnt_t, gid_t, ino_t, nlink_t, time_t, uid_t};
pub enum Type {
File, Directory, Pipe, Link, Special,