summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2023-09-29 09:32:15 +0200
committerFelix Fietkau <nbd@nbd.name>2023-10-09 15:56:32 +0200
commit0184d235b37ee09d3c17ba14cde414962eedfdca (patch)
treef6655958acf7c2e2b9eb1758adb7f97c78282542
parent8b2388482ec8a67e2ecf5032d81d889b187a32cd (diff)
include: fix execvpe compat function on macOS
Accept char * const *, cast internally. Fixes a compile error Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--include/ucode/platform.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ucode/platform.h b/include/ucode/platform.h
index 52eb391..ef244c6 100644
--- a/include/ucode/platform.h
+++ b/include/ucode/platform.h
@@ -61,12 +61,12 @@ __hidden int pipe2(int[2], int);
__hidden int sigtimedwait(const sigset_t *, siginfo_t *, const struct timespec *);
static inline int
-execvpe(const char *program, char **argv, char **envp)
+execvpe(const char *program, char * const *argv, char * const *envp)
{
char **saved = environ;
int rc;
- environ = envp;
+ environ = (char **)envp;
rc = execvp(program, argv);
environ = saved;