summaryrefslogtreecommitdiff
path: root/userland/libc/stdlib/system.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2023-11-23 00:52:35 +0100
committerAnton Kling <anton@kling.gg>2023-11-23 00:52:35 +0100
commit81819f711e6d1f9216f688da8ecbbc682d106d9c (patch)
tree0f0df7c43cc5bc956c2c067e55766bfa90823a7f /userland/libc/stdlib/system.c
parentec91e81a4fcfd7ee6bc4150f06d8740e82f808da (diff)
LibC: Reduce warnings in code
Diffstat (limited to 'userland/libc/stdlib/system.c')
-rw-r--r--userland/libc/stdlib/system.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/userland/libc/stdlib/system.c b/userland/libc/stdlib/system.c
index d951c5c..1cba966 100644
--- a/userland/libc/stdlib/system.c
+++ b/userland/libc/stdlib/system.c
@@ -1,4 +1,6 @@
#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
int system(const char *command) {
if (!command)
@@ -7,7 +9,7 @@ int system(const char *command) {
if (0 == pid) {
char *argv[2];
argv[0] = "/sh";
- argv[1] = command;
+ argv[1] = (char *)command;
execv("/sh", argv);
}
// FIXME: Use waitpid