X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprocess.c;h=d588a3fd830f50e8d7510d5fb9cd9eb4493f7dd3;hb=886a6f61a1f4cc48a77b42d10f34f9126377d904;hp=09fd63e1071a0da957a44d9eff04acb1f16b72b1;hpb=d6c50eb73ad49bd2eac67214995dff76b7a20661;p=tinc diff --git a/src/process.c b/src/process.c index 09fd63e1..d588a3fd 100644 --- a/src/process.c +++ b/src/process.c @@ -40,7 +40,9 @@ extern char *identname; extern char **g_argv; extern bool use_logfile; +#ifndef HAVE_MINGW sigset_t emptysigset; +#endif static void memory_full(int size) { logger(LOG_ERR, "Memory exhausted (couldn't allocate %d bytes), exitting.", size); @@ -261,7 +263,7 @@ bool detach(void) { bool execute_script(const char *name, char **envp) { #ifdef HAVE_SYSTEM int status, len; - char *scriptname, *p; + char *scriptname; int i; #ifndef HAVE_MINGW @@ -302,7 +304,7 @@ bool execute_script(const char *name, char **envp) { for(i = 0; envp[i]; i++) { char *e = strchr(envp[i], '='); if(e) { - p = alloca(e - envp[i] + 1); + char p[e - envp[i] + 1]; strncpy(p, envp[i], e - envp[i]); p[e - envp[i]] = '\0'; putenv(p);