diff options
| author | M.Amin Rayej <m.amin.rayej@gmail.com> | 2024-05-27 22:25:19 +0330 |
|---|---|---|
| committer | M.Amin Rayej <m.amin.rayej@gmail.com> | 2024-05-27 22:25:19 +0330 |
| commit | f1837078c788c02875b3cd9f9a4c6882b50b6460 (patch) | |
| tree | ff5ceac0cbd7fd59e4ea9d2fe9222296da506f25 | |
| parent | 66ac6e6c685880e94ecf1c6feb6ff5fec0767fb0 (diff) | |
revert changes to the unmodified version
| -rw-r--r-- | libc-top-half/musl/src/process/execve.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libc-top-half/musl/src/process/execve.c b/libc-top-half/musl/src/process/execve.c index 46f2233..76fd575 100644 --- a/libc-top-half/musl/src/process/execve.c +++ b/libc-top-half/musl/src/process/execve.c @@ -3,7 +3,7 @@ #include <stdio.h> #ifdef __wasilibc_unmodified_upstream -extern char **__environ; +#include "syscall.h" #else #include <stdlib.h> #include <wasi/api.h> @@ -32,8 +32,9 @@ static char* combine_strings(char* const strings[]) { int execve(const char *path, char *const argv[], char *const envp[]) { -#ifdef __wasilibc_unmodified_upstream - return execve(path, argv, __environ); +#ifdef __wasilibc_unmodified_upstream + /* do we need to use environ if envp is null? */ + return syscall(SYS_execve, path, argv, envp); #else char *combined_argv = combine_strings(argv); char *combined_env = combine_strings(envp); |
