diff --git a/dispd/client/session.c b/dispd/client/session.c index f85f3fa5..3ba09470 100644 --- a/dispd/client/session.c +++ b/dispd/client/session.c @@ -91,13 +91,13 @@ bool dispd_session_setup_game_rgba(struct dispd_session* session) const char* chvideomode = "chvideomode"; #if 1 // TODO chvideomode currently launches --bpp 32 as a program... - execlp(chvideomode, chvideomode, NULL); + execlp(chvideomode, chvideomode, (const char*) NULL); #else execlp(chvideomode, chvideomode, "--bpp", "32", "--show-graphics", "true", "--show-text", "false", - NULL); + (const char*) NULL); #endif perror(chvideomode); exit(127); diff --git a/init/init.c b/init/init.c index 1ed41376..b68a68a8 100644 --- a/init/init.c +++ b/init/init.c @@ -395,7 +395,7 @@ static void set_kblayout(void) return warning("unable to set keyboard layout: fork: %m"); if ( !child_pid ) { - execlp("chkblayout", "chkblayout", "--", kblayout, (char*) NULL); + execlp("chkblayout", "chkblayout", "--", kblayout, (const char*) NULL); warning("setting keyboard layout: chkblayout: %m"); _exit(127); } diff --git a/libc/stdio/popen.c b/libc/stdio/popen.c index 405e74b8..7c2ff1b0 100644 --- a/libc/stdio/popen.c +++ b/libc/stdio/popen.c @@ -131,7 +131,7 @@ FILE* popen(const char* command, const char* type) close(pipefds[unused_end]) ) _exit(127); - execlp("sh", "sh", "-c", command, NULL); + execlp("sh", "sh", "-c", command, (const char*) NULL); _exit(127); cleanup_pipes: diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c index fee02d47..efb36cc7 100644 --- a/libc/stdlib/system.c +++ b/libc/stdlib/system.c @@ -39,6 +39,6 @@ int system(const char* command) return ret_error; return status; } - execlp("sh", "sh", "-c", command, NULL); + execlp("sh", "sh", "-c", command, (const char*) NULL); _exit(exit_error); } diff --git a/sh/proper-sh.c b/sh/proper-sh.c index 3f3d60d8..89fbae4d 100644 --- a/sh/proper-sh.c +++ b/sh/proper-sh.c @@ -46,7 +46,7 @@ bool is_existing_shell(const char* candidate) open("/dev/null", O_RDONLY); open("/dev/null", O_WRONLY); open("/dev/null", O_WRONLY); - execlp("which", "which", "--", candidate, (char*) NULL); + execlp("which", "which", "--", candidate, (const char*) NULL); exit(127); } int status; diff --git a/sh/sh.c b/sh/sh.c index 221195b9..af0292b4 100644 --- a/sh/sh.c +++ b/sh/sh.c @@ -1299,7 +1299,7 @@ struct execute_result execute(char** tokens, if ( interactive && errno == ENOENT ) { int errno_saved = errno; - execlp("command-not-found", "command-not-found", argv[0], NULL); + execlp("command-not-found", "command-not-found", argv[0], (const char*) NULL); errno = errno_saved; } diff --git a/trianglix/trianglix.cpp b/trianglix/trianglix.cpp index c0f42c77..02da4d95 100644 --- a/trianglix/trianglix.cpp +++ b/trianglix/trianglix.cpp @@ -193,7 +193,7 @@ static void ExecuteFile(const char* path, int curdirfd) if ( ForkAndWait() ) { fchdir(curdirfd); - execl(path, path, (char*) NULL); + execl(path, path, (const char*) NULL); _exit(127); } } @@ -204,7 +204,7 @@ static void DisplayFile(const char* path, int curdirfd) if ( ForkAndWait() ) { fchdir(curdirfd); - execlp("editor", "editor", path, (char*) NULL); + execlp("editor", "editor", path, (const char*) NULL); _exit(127); } } @@ -215,7 +215,7 @@ static void ExecutePath(const char* path, int curdirfd) if ( ForkAndWait() ) { fchdir(curdirfd); - execlp(path, path, (char*) NULL); + execlp(path, path, (const char*) NULL); _exit(127); } } @@ -229,7 +229,7 @@ void ExecuteShellCommand(const char* command, int curdirfd) if ( ForkAndWait() ) { fchdir(curdirfd); - execlp("sh", "sh", "-c", command, (char*) NULL); + execlp("sh", "sh", "-c", command, (const char*) NULL); error(127, errno, "`%s'", "sh"); } unsigned int cur_termmode; @@ -505,7 +505,7 @@ private: void exec_program::invoke() { - execlp(program, program, (char*) NULL); + execlp(program, program, (const char*) NULL); } class development : public object diff --git a/utils/help.c b/utils/help.c index d2698af2..eb8cf803 100644 --- a/utils/help.c +++ b/utils/help.c @@ -52,8 +52,8 @@ int main(void) dup2(pipe_fds[0], 0); close(pipe_fds[0]); close(pipe_fds[1]); - execlp("column", "column", NULL); - execlp("cat", "cat", NULL); + execlp("column", "column", (const char*) NULL); + execlp("cat", "cat", (const char*) NULL); int ic; while ( (ic = fgetc(stdin)) != EOF ) fputc(ic, stdout);