diff options
author | Sam Bingner <sam@bingner.com> | 2019-04-11 22:41:08 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2020-07-17 00:22:23 -1000 |
commit | 517225b246cf1846a6225f6a244a690717f390b5 (patch) | |
tree | 57b04027bcb4a8a38c0a86f619bf63d39a04755c | |
parent | cdd93209431f84bb0c59d5ef2b57802f3ee48c95 (diff) |
Make the compiler complain less
-rw-r--r-- | apt-pkg/contrib/fileutl.h | 4 |
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; } |