diff options
author | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2018-01-08 00:13:59 +0100 |
---|---|---|
committer | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2018-02-08 08:52:53 +0100 |
commit | 08624d0a5c3649fea6463836690ae9b7f01093ac (patch) | |
tree | b03f48df7b36aa58b0301b01878eca7b129b2541 /src/sys | |
parent | dab0a5e52266f014bdf52c3181d30f068b050250 (diff) | |
download | nix-08624d0a5c3649fea6463836690ae9b7f01093ac.zip |
make statfs/statvfs to be available wherever they are available
libc reads sys/statvfs.h on all OS except Windows which nix doesn't care
about.
Closes: https://github.com/nix-rust/nix/issues/831
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/mod.rs | 12 | ||||
-rw-r--r-- | src/sys/statvfs.rs | 6 |
2 files changed, 4 insertions, 14 deletions
diff --git a/src/sys/mod.rs b/src/sys/mod.rs index 55c3d5d2..972a1b5e 100644 --- a/src/sys/mod.rs +++ b/src/sys/mod.rs @@ -54,19 +54,9 @@ pub mod socket; pub mod stat; -#[cfg(all(target_os = "linux", - any(target_arch = "x86", - target_arch = "x86_64", - target_arch = "arm")), - )] +#[cfg(any(target_os = "android", target_os = "linux", target_os = "macos"))] pub mod statfs; -#[cfg(all(any(target_os = "linux", - target_os = "macos"), - any(target_arch = "x86", - target_arch = "x86_64", - target_arch = "arm")), - )] pub mod statvfs; pub mod termios; diff --git a/src/sys/statvfs.rs b/src/sys/statvfs.rs index 41ca44f2..845ae0db 100644 --- a/src/sys/statvfs.rs +++ b/src/sys/statvfs.rs @@ -32,13 +32,13 @@ libc_bitflags!( #[cfg(any(target_os = "android", target_os = "linux"))] ST_MANDLOCK; /// Write on file/directory/symlink - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(target_os = "linux")] ST_WRITE; /// Append-only file - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(target_os = "linux")] ST_APPEND; /// Immutable file - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(target_os = "linux")] ST_IMMUTABLE; /// Do not update access times on files #[cfg(any(target_os = "android", target_os = "linux"))] |