Skip to content

Commit 243066f

Browse files
Add explicit include of wasi/libc-environ.h (#786)
This is necessary to get the `__wasilibc_get_environ` function declaration.
1 parent 2c49fab commit 243066f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/_FoundationCShims/platform_shims.c

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
extern char **environ;
2222
#endif
2323

24+
#if __wasi__
25+
#include <wasi/libc-environ.h> // for __wasilibc_get_environ
26+
#endif
27+
2428
#if __has_include(<libc_private.h>)
2529
#import <libc_private.h>
2630
void _platform_shims_lock_environ() {

0 commit comments

Comments
 (0)