]> git.proxmox.com Git - wasi-libc.git/blob - libc-bottom-half/sources/__wasilibc_environ.c
threads: enable access to `pthread_attr_get` functions (#357)
[wasi-libc.git] / libc-bottom-half / sources / __wasilibc_environ.c
1 #include <wasi/libc-environ.h>
2
3 extern char **__wasilibc_environ;
4
5 // See the comments in libc-environ.h.
6 char **__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 }