Skip to content

Commit

Permalink
Merge pull request #433 from Mic92/fix-32bit
Browse files Browse the repository at this point in the history
fix 32-bit compilation
  • Loading branch information
Mic92 authored Jan 24, 2025
2 parents d6a74b1 + 48f2823 commit 7b7e959
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,17 @@ impl CntrFs {
match reply {
ReplyDirectory::Directory(ref mut r) => r.add(
entry.d_ino,
dirp.offset,
#[allow(clippy::useless_conversion)] // needed for 32bit
dirp.offset.into(),
dtype_kind(entry.d_type),
OsStr::from_bytes(name.to_bytes()),
),
ReplyDirectory::DirectoryPlus(ref mut r) => {
match self.lookup_inode(ino, OsStr::from_bytes(name.to_bytes())) {
Ok((attr, generation)) => r.add(
entry.d_ino,
dirp.offset,
#[allow(clippy::useless_conversion)] // needed for 32bit
dirp.offset.into(),
OsStr::from_bytes(name.to_bytes()),
&TTL,
&attr,
Expand Down Expand Up @@ -415,7 +417,8 @@ impl CntrFs {
fn attr_from_stat(&self, attr: stat::FileStat) -> FileAttr {
let ctime = UNIX_EPOCH + Duration::new(attr.st_ctime as u64, attr.st_ctime_nsec as u32);
FileAttr {
ino: attr.st_ino, // replaced by ino pointer
#[allow(clippy::useless_conversion)] // needed for 32bit
ino: attr.st_ino.into(), // replaced by ino pointer
size: attr.st_size as u64,
blocks: attr.st_blocks as u64,
atime: UNIX_EPOCH + Duration::new(attr.st_atime as u64, attr.st_atime_nsec as u32),
Expand Down

0 comments on commit 7b7e959

Please sign in to comment.