commit 89f1bfa5b487d95d92b0f518532ac9c9df0434b5 (tree)
parent ab4eeb770a0af411d525616dcdbfa4a8491f8ac0
Author: Andrew Kelley <andrew@ziglang.org>
Date: Mon, 8 Jul 2024 16:58:32 -0400
Merge pull request #20526 from der-teufel-programming/fix-comp-errs
Fix a few compilation errors
Diffstat:
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/std/Build/Cache/Path.zig b/lib/std/Build/Cache/Path.zig
@@ -58,7 +58,7 @@ pub fn openFile(
return p.root_dir.handle.openFile(joined_path, flags);
}
-pub fn makeOpenPath(p: Path, sub_path: []const u8, opts: fs.OpenDirOptions) !fs.Dir {
+pub fn makeOpenPath(p: Path, sub_path: []const u8, opts: fs.Dir.OpenDirOptions) !fs.Dir {
var buf: [fs.max_path_bytes]u8 = undefined;
const joined_path = if (p.sub_path.len == 0) sub_path else p: {
break :p std.fmt.bufPrint(&buf, "{s}" ++ fs.path.sep_str ++ "{s}", .{
diff --git a/lib/std/Build/Step/TranslateC.zig b/lib/std/Build/Step/TranslateC.zig
@@ -107,7 +107,7 @@ pub fn addCheckFile(translate_c: *TranslateC, expected_matches: []const []const
/// If the value is omitted, it is set to 1.
/// `name` and `value` need not live longer than the function call.
pub fn defineCMacro(translate_c: *TranslateC, name: []const u8, value: ?[]const u8) void {
- const macro = std.Build.constructranslate_cMacro(translate_c.step.owner.allocator, name, value);
+ const macro = translate_c.step.owner.fmt("{s}={s}", .{ name, value orelse "1" });
translate_c.c_macros.append(macro) catch @panic("OOM");
}
diff --git a/lib/std/array_hash_map.zig b/lib/std/array_hash_map.zig
@@ -427,7 +427,7 @@ pub fn ArrayHashMap(
/// Set the map to an empty state, making deinitialization a no-op, and
/// returning a copy of the original.
pub fn move(self: *Self) Self {
- self.pointer_stability.assertUnlocked();
+ self.unmanaged.pointer_stability.assertUnlocked();
const result = self.*;
self.unmanaged = .{};
return result;
diff --git a/lib/std/coff.zig b/lib/std/coff.zig
@@ -542,7 +542,7 @@ pub const SectionHeader = extern struct {
pub fn setAlignment(self: *SectionHeader, new_alignment: u16) void {
assert(new_alignment > 0 and new_alignment <= 8192);
- self.flags.ALIGN = std.math.log2(new_alignment);
+ self.flags.ALIGN = @intCast(std.math.log2(new_alignment));
}
pub fn isCode(self: SectionHeader) bool {