Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on 32-bit systems. #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/nodes/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub fn timeval_to_timespec(val: sys::time::TimeVal) -> Timespec {
} 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.
Expand Down
6 changes: 3 additions & 3 deletions src/nodes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ fn setattr_size(attr: &mut fuse::FileAttr, path: Option<&PathBuf>, size: Option<
}
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;
Expand Down