mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
std: NetBSD doesn't have a reliable F_GETPATH
It can fail arbitrarily with ENOENT if the kernel happens to not have the FD in its name cache. That makes it useless for our purposes. closes https://codeberg.org/ziglang/zig/issues/30843
This commit is contained in:
parent
32f977a4b7
commit
a3ea3bd31d
2 changed files with 1 additions and 2 deletions
|
|
@ -5209,7 +5209,7 @@ fn fileRealPathPosix(userdata: ?*anyopaque, file: File, out_buffer: []u8) File.R
|
|||
|
||||
fn realPathPosix(fd: posix.fd_t, out_buffer: []u8) File.RealPathError!usize {
|
||||
switch (native_os) {
|
||||
.netbsd, .dragonfly, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
|
||||
.dragonfly, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
|
||||
var sufficient_buffer: [posix.PATH_MAX]u8 = undefined;
|
||||
@memset(&sufficient_buffer, 0);
|
||||
const syscall: Syscall = try .start();
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ pub inline fn isRealPathSupported() bool {
|
|||
.freebsd,
|
||||
=> true,
|
||||
.dragonfly => builtin.os.version_range.semver.min.order(.{ .major = 6, .minor = 0, .patch = 0 }) != .lt,
|
||||
.netbsd => builtin.os.version_range.semver.min.order(.{ .major = 10, .minor = 0, .patch = 0 }) != .lt,
|
||||
else => false,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue