summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2019-04-11 22:41:08 -1000
committerSam Bingner <sam@bingner.com>2019-08-18 12:07:59 -1000
commitbd485f75da432212d41f8c3b5cfbceb0e28d4fbb (patch)
treedab14a5f8a1359560b74a60a25de8008ce846fb2 /apt-pkg
parente0067b013206ca0ebeee9b89a1c854e871a345fb (diff)
Make the compiler complain less
Diffstat (limited to 'apt-pkg')
-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;
}