diff options
Diffstat (limited to 'newlib/libc/stdlib')
-rw-r--r-- | newlib/libc/stdlib/btowc.c | 1 | ||||
-rw-r--r-- | newlib/libc/stdlib/getopt.c | 2 | ||||
-rw-r--r-- | newlib/libc/stdlib/system.c | 1 | ||||
-rw-r--r-- | newlib/libc/stdlib/wctob.c | 1 |
4 files changed, 4 insertions, 1 deletions
diff --git a/newlib/libc/stdlib/btowc.c b/newlib/libc/stdlib/btowc.c index a1ea920ef..847d7ce1a 100644 --- a/newlib/libc/stdlib/btowc.c +++ b/newlib/libc/stdlib/btowc.c @@ -2,6 +2,7 @@ #include <stdlib.h> #include <stdio.h> #include <reent.h> +#include <string.h> wint_t btowc (int c) diff --git a/newlib/libc/stdlib/getopt.c b/newlib/libc/stdlib/getopt.c index 10002ed6b..06e378170 100644 --- a/newlib/libc/stdlib/getopt.c +++ b/newlib/libc/stdlib/getopt.c @@ -153,7 +153,7 @@ getopt_internal (int argc, char *const argv[], const char *shortopts, char *possible_arg = NULL; int longopt_match = -1; int has_arg = -1; - char *cp; + char *cp = NULL; int arg_next = 0; /* first, deal with silly parameters and easy stuff */ diff --git a/newlib/libc/stdlib/system.c b/newlib/libc/stdlib/system.c index ad2217743..0b5d9a149 100644 --- a/newlib/libc/stdlib/system.c +++ b/newlib/libc/stdlib/system.c @@ -179,6 +179,7 @@ do_system (ptr, s) return -1; else { + extern int _wait (int *); int rc = _wait (&status); if (rc == -1) return -1; diff --git a/newlib/libc/stdlib/wctob.c b/newlib/libc/stdlib/wctob.c index 57187b287..37f7f953f 100644 --- a/newlib/libc/stdlib/wctob.c +++ b/newlib/libc/stdlib/wctob.c @@ -2,6 +2,7 @@ #include <wchar.h> #include <stdlib.h> #include <stdio.h> +#include <string.h> int wctob (wint_t c) |