authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-10-16 16:03:10-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-10-29 06:20:50-07:00
log7b1502f327f580254f5699754ec21521eac10cc7
treed6371f58f0830aeb27c18b4418e5d69fdd3b92b4
parentf14c4c3db88b6194205369312d0e616c793c5e47

std: fix compilation errors on macos


2 files changed, 5 insertions(+), 9 deletions(-)

lib/compiler/libc.zig+5-1
......@@ -29,6 +29,10 @@ pub fn main() !void {
2929 const arena = arena_instance.allocator();
3030 const gpa = arena;
3131
32 var threaded: std.Io.Threaded = .init(gpa);
33 defer threaded.deinit();
34 const io = threaded.io();
35
3236 const args = try std.process.argsAlloc(arena);
3337 const zig_lib_directory = args[1];
3438
......@@ -66,7 +70,7 @@ pub fn main() !void {
6670 const target_query = std.zig.parseTargetQueryOrReportFatalError(gpa, .{
6771 .arch_os_abi = target_arch_os_abi,
6872 });
69 const target = std.zig.resolveTargetQueryOrFatal(target_query);
73 const target = std.zig.resolveTargetQueryOrFatal(io, target_query);
7074
7175 if (print_includes) {
7276 const libc_installation: ?*LibCInstallation = libc: {
lib/std/fs/test.zig-8
......@@ -1433,14 +1433,6 @@ test "setEndPos" {
14331433 try testing.expectEqual(0, try f.getEndPos());
14341434 try reader.seekTo(0);
14351435 try testing.expectEqual(0, try reader.interface.readSliceShort(&buffer));
1436
1437 // Invalid file length should error gracefully. Actual limit is host
1438 // and file-system dependent, but 1PB should fail on filesystems like
1439 // EXT4 and NTFS. But XFS or Btrfs support up to 8EiB files.
1440 try testing.expectError(error.FileTooBig, f.setEndPos(0x4_0000_0000_0000));
1441 try testing.expectError(error.FileTooBig, f.setEndPos(std.math.maxInt(u63)));
1442 try testing.expectError(error.FileTooBig, f.setEndPos(std.math.maxInt(u63) + 1));
1443 try testing.expectError(error.FileTooBig, f.setEndPos(std.math.maxInt(u64)));
14441436}
14451437
14461438test "access file" {