# std.debug: avoid os.getFdPath · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c685b675e547f61c81c5fb63159bc12b26405100)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c685b675e547f61c81c5fb63159bc12b26405100

Requested commit: c685b675e547f61c81c5fb63159bc12b26405100

Commit: c685b675e547f61c81c5fb63159bc12b26405100

Tree: 7e66d80fa84be3641d508c1e31a0645611947927

Author: Michael Dusan

Committer: Michael Dusan

## Message

```
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.

```

## Parents

- [3eedaab731d9a31ed1039dddc9eb52d8d7002c55](https://git.cafe/gitcafe/zig/commit/3eedaab731d9a31ed1039dddc9eb52d8d7002c55?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c685b675e547f61c81c5fb63159bc12b26405100?format=markdown)
