# wasi: fix wasm-wasi-musl constants · gitcafe/zig

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

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

Visibility: public

Requested revision: 138d30bb4763a5831ace21d916bde669b4ff5efb

Requested commit: 138d30bb4763a5831ace21d916bde669b4ff5efb

Commit: 138d30bb4763a5831ace21d916bde669b4ff5efb

Tree: 64b1e2d2da168992253274314fcf377861ae71b5

Author: Pat Tullmann

Committer: Alex Rønne Petersen

## Message

```
wasi: fix wasm-wasi-musl constants

Zig's copy of the `SYMLINK_{NO,}FOLLOW` constants from wasi-musl was
wrong, as were the `IFIFO` and `IFSOCK` file type flags.  Fix these up,
and add comments pointing to exactly where they come from (as the
wasi-musl source has lots of unused, different definitions of these
constants).

Add tests for the Zig convention that WASM preopen 3 is the current
working directory.   This is true for WASM with or without libc.

Enable several fs and posix tests that are now passing (not necessarily
because of this change) on wasm targets.

Fixes #20890.

```

## Parents

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

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