Skip to content

Commit cfb5a02

Browse files
kateinoigakukunMaxDesiatov
authored andcommitted
Add explicit include of wasi/libc-environ.h (#786)
This is necessary to get the `__wasilibc_get_environ` function declaration. (cherry picked from commit 243066f)
1 parent 4d1dfb4 commit cfb5a02

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)