Skip to content

Commit

Permalink
include: fix execvpe compat function on macOS
Browse files Browse the repository at this point in the history
Accept char * const *, cast internally. Fixes a compile error

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Sep 29, 2023
1 parent 320a443 commit 552bd8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/ucode/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 552bd8e

Please sign in to comment.