Skip to content

Commit a4eb221

Browse files
committed
link/MachO: avoid depending on host PATH_MAX
closes #13229 Restores ability to compile zig for WASI
1 parent 3f577f0 commit a4eb221

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/link/MachO.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3537,7 +3537,8 @@ pub fn populateMissingMetadata(self: *MachO) !void {
35373537
}
35383538

35393539
inline fn calcInstallNameLen(cmd_size: u64, name: []const u8, assume_max_path_len: bool) u64 {
3540-
const name_len = if (assume_max_path_len) std.os.PATH_MAX else std.mem.len(name) + 1;
3540+
const darwin_path_max = 1024;
3541+
const name_len = if (assume_max_path_len) darwin_path_max else std.mem.len(name) + 1;
35413542
return mem.alignForwardGeneric(u64, cmd_size + name_len, @alignOf(u64));
35423543
}
35433544

0 commit comments

Comments
 (0)