Skip to content

Commit

Permalink
fix compilation on 32 bit platforms
Browse files Browse the repository at this point in the history
/home/ci/actions-runner1/_work/zig/zig/lib/std/tar/writer.zig:112:54: error: expected type 'usize', found 'u64'
/home/ci/actions-runner1/_work/zig/zig/lib/std/tar/writer.zig:112:54: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
/home/ci/actions-runner1/_work/zig/zig/lib/std/tar/writer.zig:54:65: note: parameter type declared here
  • Loading branch information
ianic committed Apr 12, 2024
1 parent 34607df commit 1aae6d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/std/tar/writer.zig
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn Writer(comptime WriterType: type) type {
/// Writes file. File content is read from `reader`. Number of bytes in
/// reader must be equal to `size`. If options are omitted
/// `default_mode.file` is used for mode and current time for mtime.
pub fn addFile(self: *Self, sub_path: []const u8, size: usize, reader: anytype, opt: Options) !void {
pub fn addFile(self: *Self, sub_path: []const u8, size: u64, reader: anytype, opt: Options) !void {
var header = Header.init(.regular);
try self.setPath(&header, sub_path);
try self.setMtime(&header, opt.mtime);
Expand Down

0 comments on commit 1aae6d0

Please sign in to comment.