Skip to content

Commit

Permalink
Fix x86 build
Browse files Browse the repository at this point in the history
  • Loading branch information
mgord9518 committed Feb 28, 2024
1 parent b608964 commit d84dafa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/Table.zig
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ pub fn get(

var bpos = table.blocks[bnum];

const block = try sqfs.mdCache(allocator, &bpos);
// TODO: Update functions to u64
const block = try sqfs.mdCache(allocator, @ptrCast(&bpos));

@memcpy(buf[0..table.each], block.data[off..][0..table.each]);

Expand Down
6 changes: 3 additions & 3 deletions lib/squashfuse.zig
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ pub const SquashFs = struct {
);

offset.* = inode.internal.xtra.reg.frag_off;
size.* = inode.internal.xtra.reg.file_size % sqfs.internal.sb.block_size;
size.* = @intCast(inode.internal.xtra.reg.file_size % sqfs.internal.sb.block_size);

return block;
}
Expand Down Expand Up @@ -1005,7 +1005,7 @@ pub const SquashFs = struct {
pub fn fromInodeId(id: u64, base: u64) MdCursor {
return .{
.block = @intCast((id >> 16) + base),
.offset = id & 0xffff,
.offset = @intCast(id & 0xffff),
};
}
};
Expand Down Expand Up @@ -1124,7 +1124,7 @@ fn readRange(

data_off = 0;
if (bl.input_size == 0) {
data_size = file_size - bl.pos;
data_size = @intCast(file_size - bl.pos);

if (data_size > block_size) data_size = block_size;
} else {
Expand Down

0 comments on commit d84dafa

Please sign in to comment.