summaryrefslogtreecommitdiff
path: root/sysutils/runit-faster/files/patch-src_pathexec__run.c
blob: 6dd033e247bb09a061e05c307e7cd08ada436cb7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- src/pathexec_run.c.orig	2014-08-10 18:22:35 UTC
+++ src/pathexec_run.c
@@ -5,6 +5,7 @@
 #include "str.h"
 #include "env.h"
 #include "pathexec.h"
+#include <unistd.h>
 
 static stralloc tmp;
 
@@ -15,7 +16,7 @@ void pathexec_run(const char *file,const char * const 
   int savederrno;
 
   if (file[str_chr(file,'/')]) {
-    execve(file,argv,envp);
+    execve(file,(char *const *)argv,(char *const *)envp);
     return;
   }
 
@@ -32,7 +33,7 @@ void pathexec_run(const char *file,const char * const 
     if (!stralloc_cats(&tmp,file)) return;
     if (!stralloc_0(&tmp)) return;
 
-    execve(tmp.s,argv,envp);
+    execve(tmp.s,(char *const *)argv,(char * const *)envp);
     if (errno != error_noent) {
       savederrno = errno;
       if ((errno != error_acces) && (errno != error_perm) && (errno != error_isdir)) return;