master
1#include <wasi/libc-environ.h>
2
3extern char **__wasilibc_environ;
4
5// See the comments in libc-environ.h.
6char **__wasilibc_get_environ(void) {
7 // Perform lazy initialization if needed.
8 __wasilibc_ensure_environ();
9
10 // Return `environ`. Use the `__wasilibc_`-prefixed name so that we don't
11 // pull in the `environ` symbol directly, which would lead to eager
12 // initialization being done instead.
13 return __wasilibc_environ;
14}