# stage1: fix \`wasi_snapshot_preview1_fd_seek\` on cache files · gitcafe/zig

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

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

Visibility: public

Requested revision: d8ac37fcc8d46adab6131db9c1a35131919f002b

Requested commit: d8ac37fcc8d46adab6131db9c1a35131919f002b

Commit: d8ac37fcc8d46adab6131db9c1a35131919f002b

Tree: 4980249c51f0ba0c8101a4d64e66f0c09c19dc6b

Author: mlugg

Committer: mlugg

## Message

```
stage1: fix `wasi_snapshot_preview1_fd_seek` on cache files

`wasm2c` uses an interesting mechanism to "fake" the existence of cache
directories. However, `wasi_snapshot_preview1_fd_seek` was not correctly
integrated with this system, so previously crashed when run on a file in
a cache directory due to trying to call `fseek` on a `FILE *` which was
`NULL`.

```

## Parents

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

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