tccrun: Ensure `environ` is declared before use

It may not be declared by system headers.
This commit is contained in:
Ole André Vadla Ravnås 2022-01-12 02:13:18 +01:00
parent c420c41a1b
commit d0e5d115cf
1 changed files with 5 additions and 0 deletions

View File

@ -68,6 +68,8 @@ static void win64_del_function_table(void *);
#ifdef __APPLE__
static addr_t cached_page_size = 0;
#else
extern char **environ;
#endif
/* ------------------------------------------------------------- */
@ -140,6 +142,9 @@ static void run_cdtors(TCCState *s1, const char *start, const char *end,
((void(*)(int, char **, char **))*a++)(argc, argv, envp);
}
#ifndef __APPLE__
#endif
/* launch the compiled program with the given arguments */
LIBTCCAPI int tcc_run(TCCState *s1, int argc, char **argv)
{