mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 16:24:51 +00:00
std.debug: avoid os.getFdPath
Commit ea9917d9bd921f9fc14028a8dbf9e3f0f2579120 introduced usage of fs.Dir.realpath which eventually calls os.getFdpath which is forbidden to be used by the compiler. It causes building zig to fail on OpenBsd, NetBSD and older versions of FreeBSD and DragonFly. This patch substitutes with os.realpath on libc targets and eventually calls c.realpath and allows zig to build. Any use of realpath is not desired but this is the lesser evil.
This commit is contained in:
parent
3eedaab731
commit
c685b675e5
@ -1228,7 +1228,7 @@ pub fn readElfDebugInfo(
|
||||
}
|
||||
|
||||
var cwd_buf: [fs.MAX_PATH_BYTES]u8 = undefined;
|
||||
const cwd_path = fs.cwd().realpath("", &cwd_buf) catch break :blk;
|
||||
const cwd_path = os.realpath(".", &cwd_buf) catch break :blk;
|
||||
|
||||
// <global debug directory>/<absolute folder of current binary>/<gnu_debuglink>
|
||||
for (global_debug_directories) |global_directory| {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user