From a44b3f7dbdaed811167a087cdf402ea6d2b24760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Mon, 5 Aug 2019 20:31:39 +0200 Subject: [PATCH] i3status-rust: fix 32 bit builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Buchmüller --- .../patches/{fix-i686.patch => fix-32bit.patch} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename srcpkgs/i3status-rust/patches/{fix-i686.patch => fix-32bit.patch} (70%) diff --git a/srcpkgs/i3status-rust/patches/fix-i686.patch b/srcpkgs/i3status-rust/patches/fix-32bit.patch similarity index 70% rename from srcpkgs/i3status-rust/patches/fix-i686.patch rename to srcpkgs/i3status-rust/patches/fix-32bit.patch index 841069e1fbc..d77308460ea 100644 --- a/srcpkgs/i3status-rust/patches/fix-i686.patch +++ b/srcpkgs/i3status-rust/patches/fix-32bit.patch @@ -7,18 +7,18 @@ diff --git a/src/blocks/disk_space.rs b/src/blocks/disk_space.rs let mut converted_str = String::new(); - let total = statvfs.blocks() * statvfs.fragment_size(); - let used = (statvfs.blocks() - statvfs.blocks_free()) * statvfs.fragment_size(); -+ let total = (statvfs.blocks() * statvfs.fragment_size() as u64) as u64; -+ let used = ((statvfs.blocks() - statvfs.blocks_free()) * statvfs.fragment_size() as u64) as u64; ++ let total = (statvfs.blocks() as u64 * statvfs.fragment_size() as u64) as u64; ++ let used = ((statvfs.blocks() as u64 - statvfs.blocks_free() as u64) * statvfs.fragment_size() as u64) as u64; match self.info_type { InfoType::Available => { - result = statvfs.blocks_available() * statvfs.block_size(); -+ result = (statvfs.blocks_available() * statvfs.block_size() as u64) as u64; ++ result = (statvfs.blocks_available() as u64 * statvfs.block_size() as u64) as u64; converted = Unit::bytes_in_unit(self.unit, result); } InfoType::Free => { - result = statvfs.blocks_free() * statvfs.block_size(); -+ result = (statvfs.blocks_free() * statvfs.block_size() as u64) as u64; ++ result = (statvfs.blocks_free() as u64 * statvfs.block_size() as u64) as u64; converted = Unit::bytes_in_unit(self.unit, result); } InfoType::Total => {