summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 e003f8cb4..92861ef76 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -37,7 +37,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\" \"$@\"";
@@ -45,7 +45,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;
}