]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Wrapper.pm
switch to 1 parameter version of file_pruned
[git.ikiwiki.info.git] / IkiWiki / Wrapper.pm
index f175b4a0ba168242ebb8396d6608cdb001cb0b34..3f3e63ca6b9957440dc45c81a1e4721b66559221 100644 (file)
@@ -101,6 +101,7 @@ EOF
 #include <string.h>
 #include <sys/file.h>
 
+extern char **environ;
 char *newenviron[$#envsave+6];
 int i=0;
 
@@ -121,12 +122,17 @@ $envsave
        newenviron[i++]="HOME=$ENV{HOME}";
        newenviron[i++]="WRAPPED_OPTIONS=$configstring";
 
+#ifdef __TINYC__
        if (clearenv() != 0) {
                perror("clearenv");
                exit(1);
        }
        for (; i>0; i--)
                putenv(newenviron[i-1]);
+#else
+       newenviron[i]=NULL;
+       environ=newenviron;
+#endif
 
        if (setregid(getegid(), -1) != 0 &&
            setregid(getegid(), -1) != 0) {