fix build on 32bit systems

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2018-03-08 22:37:16 +01:00
parent 57b279ec22
commit ef226cc81e
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C
2 changed files with 14 additions and 0 deletions

13
32bit-fix.diff Normal file
View File

@ -0,0 +1,13 @@
diff --git a/src/engine/strat_engine/thinpool/filesystem.rs b/src/engine/strat_engine/thinpool/filesystem.rs
index ae6c66b..ffcf962 100644
--- a/src/engine/strat_engine/thinpool/filesystem.rs
+++ b/src/engine/strat_engine/thinpool/filesystem.rs
@@ -225,6 +225,6 @@ pub fn fs_usage(mount_point: &Path) -> EngineResult<(Bytes, Bytes)> {
// Upcast to u64.
let f_bsize = stat.block_size() as u64;
- let blocks = stat.blocks();
- Ok((Bytes(f_bsize * blocks), Bytes(f_bsize * (blocks - stat.blocks_free()))))
+ let blocks = stat.blocks() as u64;
+ Ok((Bytes(f_bsize * blocks), Bytes(f_bsize * (blocks - stat.blocks_free() as u64))))
}

View File

@ -15,6 +15,7 @@ Summary: Daemon that manages block devices to create filesystems
License: MPLv2.0
URL: https://github.com/stratis-storage/stratisd
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0: 32bit-fix.diff
ExclusiveArch: %{rust_arches}