aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-12-07 17:03:29 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-12-07 17:03:29 -0700
commit83a668195526df745362b1174bfd643a0cdfb128 (patch)
treee8f353036e356d88515d343f18f4bd4ba5d4aea3 /src
parentde81c504b187279e6daba30df9673835f7f6c1eb (diff)
downloadzig-83a668195526df745362b1174bfd643a0cdfb128.tar.gz
zig-83a668195526df745362b1174bfd643a0cdfb128.zip
link: fix build for 32-bit targets
This wasn't caught by the CI checks because this function is is only called for the `use_stage1` codepath.
Diffstat (limited to 'src')
-rw-r--r--src/link/MachO.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/link/MachO.zig b/src/link/MachO.zig
index 47502b8e7a..456b8b1e99 100644
--- a/src/link/MachO.zig
+++ b/src/link/MachO.zig
@@ -1985,7 +1985,7 @@ fn writeAllAtoms(self: *MachO) !void {
var buffer = std.ArrayList(u8).init(self.base.allocator);
defer buffer.deinit();
- try buffer.ensureTotalCapacity(sect.size);
+ try buffer.ensureTotalCapacity(try math.cast(usize, sect.size));
log.debug("writing atoms in {s},{s}", .{ commands.segmentName(sect), commands.sectionName(sect) });