Skip to content

Commit e2c19c6

Browse files
committed
Merge #832
832: make statfs/statvfs to be available everywhere r=asomers a=ignatenkobrain libc reads sys/statvfs.h on all OS except Windows which nix doesn't care about. Closes: #831 Signed-off-by: Igor Gnatenko <[email protected]>
2 parents dab0a5e + 08624d0 commit e2c19c6

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1111
- Added `alarm`. ([#830](https://github.com/nix-rust/nix/pull/830))
1212
- Added interface flags `IFF_NO_PI, IFF_TUN, IFF_TAP` on linux-like systems.
1313
([#853](https://github.com/nix-rust/nix/pull/853))
14+
- Added `statvfs` module to all MacOS and Linux architectures.
15+
([#832](https://github.com/nix-rust/nix/pull/832))
1416

1517
### Changed
1618
- Display and Debug for SysControlAddr now includes all fields.

src/sys/mod.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,9 @@ pub mod socket;
5454

5555
pub mod stat;
5656

57-
#[cfg(all(target_os = "linux",
58-
any(target_arch = "x86",
59-
target_arch = "x86_64",
60-
target_arch = "arm")),
61-
)]
57+
#[cfg(any(target_os = "android", target_os = "linux", target_os = "macos"))]
6258
pub mod statfs;
6359

64-
#[cfg(all(any(target_os = "linux",
65-
target_os = "macos"),
66-
any(target_arch = "x86",
67-
target_arch = "x86_64",
68-
target_arch = "arm")),
69-
)]
7060
pub mod statvfs;
7161

7262
pub mod termios;

src/sys/statvfs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ libc_bitflags!(
3232
#[cfg(any(target_os = "android", target_os = "linux"))]
3333
ST_MANDLOCK;
3434
/// Write on file/directory/symlink
35-
#[cfg(any(target_os = "android", target_os = "linux"))]
35+
#[cfg(target_os = "linux")]
3636
ST_WRITE;
3737
/// Append-only file
38-
#[cfg(any(target_os = "android", target_os = "linux"))]
38+
#[cfg(target_os = "linux")]
3939
ST_APPEND;
4040
/// Immutable file
41-
#[cfg(any(target_os = "android", target_os = "linux"))]
41+
#[cfg(target_os = "linux")]
4242
ST_IMMUTABLE;
4343
/// Do not update access times on files
4444
#[cfg(any(target_os = "android", target_os = "linux"))]

0 commit comments

Comments
 (0)