Merge branch 'master' into 1.1
[tinc] / src / process.c
index 09fd63e..d588a3f 100644 (file)
@@ -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);