Skip to content

Commit 3d3cfa3

Browse files
std.fs.Dir: no flock when not defined
1 parent 8fce590 commit 3d3cfa3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/std/debug/SelfInfo.zig

+2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ pub fn getModuleNameForAddress(self: *SelfInfo, address: usize) ?[]const u8 {
146146
return self.lookupModuleNameWin32(address);
147147
} else if (native_os == .haiku) {
148148
return null;
149+
} else if (native_os == .uefi) {
150+
return null;
149151
} else if (builtin.target.isWasm()) {
150152
return null;
151153
} else {

lib/std/fs/Dir.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -2787,4 +2787,4 @@ const assert = std.debug.assert;
27872787
const linux = std.os.linux;
27882788
const windows = std.os.windows;
27892789
const native_os = builtin.os.tag;
2790-
const have_flock = @TypeOf(posix.system.flock) != void;
2790+
const have_flock = @hasDecl(posix.system, "flock") and @TypeOf(posix.system.flock) != void;

0 commit comments

Comments
 (0)