Skip to content

Commit 89f1bfa

Browse files
authored
Merge pull request #20526 from der-teufel-programming/fix-comp-errs
Fix a few compilation errors
2 parents ab4eeb7 + 7205756 commit 89f1bfa

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/std/Build/Cache/Path.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub fn openFile(
5858
return p.root_dir.handle.openFile(joined_path, flags);
5959
}
6060

61-
pub fn makeOpenPath(p: Path, sub_path: []const u8, opts: fs.OpenDirOptions) !fs.Dir {
61+
pub fn makeOpenPath(p: Path, sub_path: []const u8, opts: fs.Dir.OpenDirOptions) !fs.Dir {
6262
var buf: [fs.max_path_bytes]u8 = undefined;
6363
const joined_path = if (p.sub_path.len == 0) sub_path else p: {
6464
break :p std.fmt.bufPrint(&buf, "{s}" ++ fs.path.sep_str ++ "{s}", .{

lib/std/Build/Step/TranslateC.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub fn addCheckFile(translate_c: *TranslateC, expected_matches: []const []const
107107
/// If the value is omitted, it is set to 1.
108108
/// `name` and `value` need not live longer than the function call.
109109
pub fn defineCMacro(translate_c: *TranslateC, name: []const u8, value: ?[]const u8) void {
110-
const macro = std.Build.constructranslate_cMacro(translate_c.step.owner.allocator, name, value);
110+
const macro = translate_c.step.owner.fmt("{s}={s}", .{ name, value orelse "1" });
111111
translate_c.c_macros.append(macro) catch @panic("OOM");
112112
}
113113

lib/std/array_hash_map.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ pub fn ArrayHashMap(
427427
/// Set the map to an empty state, making deinitialization a no-op, and
428428
/// returning a copy of the original.
429429
pub fn move(self: *Self) Self {
430-
self.pointer_stability.assertUnlocked();
430+
self.unmanaged.pointer_stability.assertUnlocked();
431431
const result = self.*;
432432
self.unmanaged = .{};
433433
return result;

lib/std/coff.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ pub const SectionHeader = extern struct {
542542

543543
pub fn setAlignment(self: *SectionHeader, new_alignment: u16) void {
544544
assert(new_alignment > 0 and new_alignment <= 8192);
545-
self.flags.ALIGN = std.math.log2(new_alignment);
545+
self.flags.ALIGN = @intCast(std.math.log2(new_alignment));
546546
}
547547

548548
pub fn isCode(self: SectionHeader) bool {

0 commit comments

Comments
 (0)