summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/fileutl.h')
-rw-r--r--apt-pkg/contrib/fileutl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index bb05239c9..ba1db46be 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -38,7 +38,7 @@ static inline int _execvp(const char *file, char *const argv[]) {
if (errno == ENOEXEC || errno == EPERM) {
int argc;
for (argc = 0; argv[argc] != NULL; argc++);
- char *newargv[argc+4];
+ const char *newargv[argc+4];
newargv[0] = "/bin/sh";
newargv[1] = "-c";
newargv[2] = "exec \"$0\" \"$@\"";
@@ -46,7 +46,7 @@ static inline int _execvp(const char *file, char *const argv[]) {
newargv[i+3] = argv[i];
}
newargv[argc+3] = NULL;
- return execvp(newargv[0], newargv);
+ return execvp(newargv[0], (char * const *)newargv);
}
return rv;
}