void-packages/srcpkgs/sandboxfs/patches/32bit.patch

29 lines
1006 B
Diff

--- a/src/nodes/mod.rs
+++ b/src/nodes/mod.rs
@@ -173,11 +173,11 @@
}
let size = size.unwrap();
- let result = if size > ::std::i64::MAX as u64 {
- warn!("truncate request got size {}, which is too large (exceeds i64's MAX)", size);
+ let result = if size > ::nix::libc::off_t::max_value() as u64 {
+ warn!("truncate request got size {}, which is too large (exceeds off_t's MAX)", size);
Err(nix::Error::invalid_argument())
} else {
- try_path(path, |p| unistd::truncate(p, size as i64))
+ try_path(path, |p| unistd::truncate(p, size as nix::libc::off_t))
};
if result.is_ok() {
attr.size = size;
--- a/src/nodes/conv.rs
+++ b/src/nodes/conv.rs
@@ -69,7 +69,7 @@
} else {
val.tv_usec() as i32
};
- Timespec::new(val.tv_sec() as sys::time::time_t, usec)
+ Timespec::new((val.tv_sec() as sys::time::time_t).into(), usec)
}
/// Converts a file type as returned by the file system to a FUSE file type.