diff --git a/0001-make-statfs-statvfs-to-be-available-wherever-they-ar.patch b/0001-make-statfs-statvfs-to-be-available-wherever-they-ar.patch new file mode 100644 index 0000000..88d12c3 --- /dev/null +++ b/0001-make-statfs-statvfs-to-be-available-wherever-they-ar.patch @@ -0,0 +1,45 @@ +From 453be9e9e7b2731fa8a5c9605104839dcd8285b7 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Mon, 8 Jan 2018 00:13:59 +0100 +Subject: [PATCH] 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 +--- + src/sys/mod.rs | 15 ++------------- + 1 file changed, 2 insertions(+), 13 deletions(-) + +diff --git a/src/sys/mod.rs b/src/sys/mod.rs +index 9636f93..9c12ede 100644 +--- a/src/sys/mod.rs ++++ b/src/sys/mod.rs +@@ -62,20 +62,9 @@ pub mod select; + )] + pub mod quota; + +- +-#[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 pthread; +-- +2.15.1 + diff --git a/rust-nix.spec b/rust-nix.spec index 7f9bc6c..083de9d 100644 --- a/rust-nix.spec +++ b/rust-nix.spec @@ -7,7 +7,7 @@ Name: rust-%{crate} Version: 0.9.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Rust friendly bindings to *nix APIs License: MIT @@ -18,6 +18,8 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{ # * Bump lazy_static to 1, https://github.com/nix-rust/nix/commit/dcd190a93cda47c525c6c51cc0159699333310fd # * Bump rand to 0.4, https://github.com/nix-rust/nix/pull/822 Patch0: nix-0.9.0-fix-metadata.diff +# https://github.com/nix-rust/nix/pull/832 +Patch1: 0001-make-statfs-statvfs-to-be-available-wherever-they-ar.patch ExclusiveArch: %{rust_arches} @@ -71,6 +73,9 @@ which use %{crate} from crates.io. %exclude %{cargo_registry}/%{crate}-%{version}/{Cross.toml,RELEASE_PROCEDURE.md,bors.toml} %changelog +* Mon Jan 08 2018 Igor Gnatenko - 0.9.0-3 +- Implement statfs/statvfs on altarches + * Mon Jan 01 2018 Igor Gnatenko - 0.9.0-2 - Bump rand to 0.4