Skip to content

Commit 618aac1

Browse files
committed
std.tar: fix build on 32 bit platform
Fixing error from ci: std/tar.zig:423:54: error: expected type 'usize', found 'u64' std/tar.zig:423:54: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
1 parent 10393c6 commit 618aac1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/std/tar.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ fn Iterator(comptime ReaderType: type) type {
304304
// bytes of padding to the end of the block
305305
padding: usize,
306306
// not consumed bytes of file from last next iteration
307-
unread_file_bytes: usize = 0,
307+
unread_file_bytes: u64 = 0,
308308

309309
pub const File = struct {
310310
name: []const u8, // name of file, symlink or directory
@@ -313,7 +313,7 @@ fn Iterator(comptime ReaderType: type) type {
313313
mode: u32 = 0,
314314
kind: FileKind = .file,
315315

316-
unread_bytes: *usize,
316+
unread_bytes: *u64,
317317
reader: ReaderType,
318318

319319
pub const Reader = std.io.Reader(*Self, ReaderType.Error, read);

0 commit comments

Comments
 (0)