Commit a704368
committed
winstubs: include Misra/Std/Zstr.h for the Zstr typedef
The freestanding Windows-LLVM CI fails compiling `_WinStubs.c` with
`unknown type name 'Zstr'` at the `misra_getenv_stub` declaration.
The file uses `Zstr` (following the project convention -- no bare
`char *` / `const char *` outside the `_Generic` carve-out) but only
includes `Misra/Config.h`, which does not transitively pull in
`Zstr.h`. Standard-CI builds succeed because Sys.c is compiled first
in the same TU graph and earlier includes pull `Zstr.h` in via
something else; the freestanding LLVM build path doesn't get that
indirect include and fails.
Add the explicit `#include <Misra/Std/Zstr.h>`. The header is
header-only -- it brings in `Allocator.h`, `Vec/Type.h`, and
`Types.h`, all of which are typedef-only and libc-free, so the
freestanding constraint is preserved.1 parent 753838c commit a704368
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
0 commit comments