diff options
Diffstat (limited to 'libc/stdlib')
-rw-r--r-- | libc/stdlib/atexit.c | 1 | ||||
-rw-r--r-- | libc/stdlib/getpt.c | 2 | ||||
-rw-r--r-- | libc/stdlib/grantpt.c | 2 | ||||
-rw-r--r-- | libc/stdlib/malloc/malloc.c | 2 | ||||
-rw-r--r-- | libc/stdlib/ptsname.c | 2 | ||||
-rw-r--r-- | libc/stdlib/putenv.c | 3 | ||||
-rw-r--r-- | libc/stdlib/setenv.c | 3 | ||||
-rw-r--r-- | libc/stdlib/strto_ll.c | 1 | ||||
-rw-r--r-- | libc/stdlib/unix_grantpt.c | 2 |
9 files changed, 10 insertions, 8 deletions
diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c index 1ff8d9004..503e3da1f 100644 --- a/libc/stdlib/atexit.c +++ b/libc/stdlib/atexit.c @@ -20,6 +20,7 @@ * __stdio_close_all. */ +#include <unistd.h> #include <stdlib.h> #include <errno.h> diff --git a/libc/stdlib/getpt.c b/libc/stdlib/getpt.c index 74f009a95..0ee2d90d6 100644 --- a/libc/stdlib/getpt.c +++ b/libc/stdlib/getpt.c @@ -86,4 +86,4 @@ getpt (void) #define PTYNAME2 "0123456789abcdef"; #define __getpt __bsd_getpt -#include <bsd_getpt.c> +#include "bsd_getpt.c" diff --git a/libc/stdlib/grantpt.c b/libc/stdlib/grantpt.c index 63f423b8f..7aa49fcd5 100644 --- a/libc/stdlib/grantpt.c +++ b/libc/stdlib/grantpt.c @@ -63,4 +63,4 @@ grantpt (int fd) } #define grantpt __unix_grantpt -#include <unix_grantpt.c> +#include "unix_grantpt.c" diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c index 95dda3da5..432f893e8 100644 --- a/libc/stdlib/malloc/malloc.c +++ b/libc/stdlib/malloc/malloc.c @@ -53,9 +53,9 @@ * Converted INIT_BLOCK() and FREE_MEM_DEL_BLOCK() from macros to functions. */ +#include <features.h> #define _POSIX_SOURCE #define _XOPEN_SOURCE -#include <features.h> #include <sys/types.h> #include <unistd.h> #include <limits.h> diff --git a/libc/stdlib/ptsname.c b/libc/stdlib/ptsname.c index 2fbc6be49..fd50da047 100644 --- a/libc/stdlib/ptsname.c +++ b/libc/stdlib/ptsname.c @@ -145,7 +145,7 @@ int ptsname_r (int fd, char *buf, size_t buflen) p[2] = '\0'; } - if (_xstat (_STAT_VER, buf, &st) < 0) + if (__xstat (_STAT_VER, buf, &st) < 0) return errno; /* Check if the name we're about to return really corresponds to a diff --git a/libc/stdlib/putenv.c b/libc/stdlib/putenv.c index 5f27e57d7..b5a202bfd 100644 --- a/libc/stdlib/putenv.c +++ b/libc/stdlib/putenv.c @@ -9,8 +9,7 @@ #define ADD_NUM 4 -int putenv(var) -const char *var; +int putenv (char *var) { static char **mall_env = 0; static int extras = 0; diff --git a/libc/stdlib/setenv.c b/libc/stdlib/setenv.c index 25eb641ba..d304cb4ac 100644 --- a/libc/stdlib/setenv.c +++ b/libc/stdlib/setenv.c @@ -122,7 +122,7 @@ do_return: } -void unsetenv(const char *name) +int unsetenv (const char *name) { register char **ep; register char **dp; @@ -139,4 +139,5 @@ void unsetenv(const char *name) *dp = NULL; UNLOCK(); + return 0; } diff --git a/libc/stdlib/strto_ll.c b/libc/stdlib/strto_ll.c index c3a5439b3..76a1a95b3 100644 --- a/libc/stdlib/strto_ll.c +++ b/libc/stdlib/strto_ll.c @@ -40,6 +40,7 @@ #endif #include <stdlib.h> +#define __USE_GNU #include <limits.h> #include <ctype.h> diff --git a/libc/stdlib/unix_grantpt.c b/libc/stdlib/unix_grantpt.c index c8d70ad64..3dce71b6f 100644 --- a/libc/stdlib/unix_grantpt.c +++ b/libc/stdlib/unix_grantpt.c @@ -106,7 +106,7 @@ grantpt (int fd) if (pts_name (fd, &buf, sizeof (_buf))) return -1; - if (_xstat (_STAT_VER, buf, &st) < 0) + if (__xstat (_STAT_VER, buf, &st) < 0) goto cleanup; /* Make sure that we own the device. */ |