From 89b06b20006c02e8a4f29e92fd24c418cd31079f Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Fri, 26 Jul 2024 07:40:14 +0000 Subject: [PATCH] Add explicit include of `wasi/libc-environ.h` This is necessary to get the `__wasilibc_get_environ` function declaration. --- Sources/_FoundationCShims/platform_shims.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/_FoundationCShims/platform_shims.c b/Sources/_FoundationCShims/platform_shims.c index 5a400a468..6f792241c 100644 --- a/Sources/_FoundationCShims/platform_shims.c +++ b/Sources/_FoundationCShims/platform_shims.c @@ -21,6 +21,10 @@ extern char **environ; #endif +#if __wasi__ +#include // for __wasilibc_get_environ +#endif + #if __has_include() #import void _platform_shims_lock_environ() {