Skip to content

Commit a704368

Browse files
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

File tree

Source/Misra/_WinStubs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
/// section (1) for the full design.
2525

2626
#include <Misra/Config.h>
27+
#include <Misra/Std/Zstr.h>
2728

2829
#if PLATFORM_WINDOWS
2930

0 commit comments

Comments
 (0)