Skip to content

Commit 1aae6d0

Browse files
committed
fix compilation on 32 bit platforms
/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
1 parent 34607df commit 1aae6d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/tar/writer.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn Writer(comptime WriterType: type) type {
5151
/// Writes file. File content is read from `reader`. Number of bytes in
5252
/// reader must be equal to `size`. If options are omitted
5353
/// `default_mode.file` is used for mode and current time for mtime.
54-
pub fn addFile(self: *Self, sub_path: []const u8, size: usize, reader: anytype, opt: Options) !void {
54+
pub fn addFile(self: *Self, sub_path: []const u8, size: u64, reader: anytype, opt: Options) !void {
5555
var header = Header.init(.regular);
5656
try self.setPath(&header, sub_path);
5757
try self.setMtime(&header, opt.mtime);

0 commit comments

Comments
 (0)