# Default std.posix.system.ucontext_t is void · gitcafe/zig

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

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

Visibility: public

Requested revision: e8503ecb6552087d6954423e59f3dfa8ca4a1b09

Requested commit: e8503ecb6552087d6954423e59f3dfa8ca4a1b09

Commit: e8503ecb6552087d6954423e59f3dfa8ca4a1b09

Tree: fb48a161f4071dae76a3bef0af2fda6f3804b216

Author: Pat Tullmann

Committer: Andrew Kelley

## Message

```
Default std.posix.system.ucontext_t is void

PR https://github.com/ziglang/zig/pull/20679 ("std.c reorganization")
switched feature-detection code to use "T != void" checks in place of
"@hasDecl".  However, the std.posix.system struct is empty, so
compile-time feature detection against symbols in there (specifically
`std.posix.system.ucontext_t` in this case), fail at compile time on
freestanding targets.

This PR adds a void ucontext_t into the std.posix.system default.

This PR also adds pseudo-"freestanding" variation of the StackIterator
"unwind" test.  It is sort of hacky (its freestanding, but assumes it can
invoke a Linux exit syscall), but it does detect this problem.

Fixes #20710

```

## Parents

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

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