diff --git a/lang/cem/libcc.ansi/signal/raise.c b/lang/cem/libcc.ansi/signal/raise.c index da37897d4..42b3b4cec 100644 --- a/lang/cem/libcc.ansi/signal/raise.c +++ b/lang/cem/libcc.ansi/signal/raise.c @@ -5,9 +5,9 @@ /* $Id$ */ #if defined(_POSIX_SOURCE) -#include +#include #endif -#include +#include int raise(int sig) diff --git a/lang/cem/libcc.ansi/stdlib/system.c b/lang/cem/libcc.ansi/stdlib/system.c index 313ee32f5..99a8d6e6a 100644 --- a/lang/cem/libcc.ansi/stdlib/system.c +++ b/lang/cem/libcc.ansi/stdlib/system.c @@ -5,10 +5,12 @@ /* $Id$ */ #if defined(_POSIX_SOURCE) -#include +#include #endif -#include -#include +#include +#include + +extern char** environ; extern int _fork(void); extern int _wait(int *); @@ -18,7 +20,6 @@ extern void _close(int); #define FAIL 127 -extern const char **environ; static const char *exec_tab[] = { "sh", /* argv[0] */ "-c", /* argument to the shell */ @@ -39,7 +40,7 @@ system(const char *str) _close(i); if (!str) str = "cd ."; /* just testing for a shell */ exec_tab[2] = str; /* fill in command */ - _execve("/bin/sh", exec_tab, environ); + _execve("/bin/sh", exec_tab, (char const**) environ); /* get here if execve fails ... */ _exit(FAIL); /* see manual page */ } diff --git a/lang/cem/libcc.ansi/string/strdup.c b/lang/cem/libcc.ansi/string/strdup.c index 730796b5f..d197171a9 100644 --- a/lang/cem/libcc.ansi/string/strdup.c +++ b/lang/cem/libcc.ansi/string/strdup.c @@ -4,7 +4,8 @@ */ /* $Id$ */ -#include +#include +#include char* strdup(const char *s) diff --git a/plat/rpi/include/unistd.h b/plat/rpi/include/unistd.h index 196b823c4..6c220d10f 100644 --- a/plat/rpi/include/unistd.h +++ b/plat/rpi/include/unistd.h @@ -89,6 +89,7 @@ typedef int sig_atomic_t; typedef void (*sighandler_t)(int); extern sighandler_t signal(int signum, sighandler_t handler); extern int raise(int signum); +extern int kill(pid_t pid, int sig); /* Select */