From d5ec672e0bb1b1d821ddf74178a1b6463b139462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Anic=CC=81?= Date: Wed, 10 Apr 2024 23:13:47 +0200 Subject: [PATCH] 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 --- lib/std/tar/writer.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/tar/writer.zig b/lib/std/tar/writer.zig index 0a258cd07b9c..a0f7b4441199 100644 --- a/lib/std/tar/writer.zig +++ b/lib/std/tar/writer.zig @@ -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);