diff options
Diffstat (limited to 'src/env')
-rw-r--r-- | src/env/__libc_start_main.c | 3 | ||||
-rw-r--r-- | src/env/clearenv.c | 1 | ||||
-rw-r--r-- | src/env/getenv.c | 3 | ||||
-rw-r--r-- | src/env/putenv.c | 3 | ||||
-rw-r--r-- | src/env/setenv.c | 3 | ||||
-rw-r--r-- | src/env/unsetenv.c | 3 |
6 files changed, 5 insertions, 11 deletions
diff --git a/src/env/__libc_start_main.c b/src/env/__libc_start_main.c index c1b0669..58da9e8 100644 --- a/src/env/__libc_start_main.c +++ b/src/env/__libc_start_main.c @@ -2,12 +2,11 @@ #include <poll.h> #include <fcntl.h> #include <signal.h> +#include <unistd.h> #include "syscall.h" #include "atomic.h" #include "libc.h" -void __init_tls(size_t *); - static void dummy(void) {} weak_alias(dummy, _init); diff --git a/src/env/clearenv.c b/src/env/clearenv.c index da18775..2e275b4 100644 --- a/src/env/clearenv.c +++ b/src/env/clearenv.c @@ -1,5 +1,6 @@ #define _GNU_SOURCE #include <stdlib.h> +#include <unistd.h> #include "libc.h" static void dummy(char *old, char *new) {} diff --git a/src/env/getenv.c b/src/env/getenv.c index cf34672..f279779 100644 --- a/src/env/getenv.c +++ b/src/env/getenv.c @@ -1,9 +1,8 @@ #include <stdlib.h> #include <string.h> +#include <unistd.h> #include "libc.h" -char *__strchrnul(const char *, int); - char *getenv(const char *name) { size_t l = __strchrnul(name, '=') - name; diff --git a/src/env/putenv.c b/src/env/putenv.c index fa4a4dd..20f9602 100644 --- a/src/env/putenv.c +++ b/src/env/putenv.c @@ -1,9 +1,8 @@ #include <stdlib.h> #include <string.h> +#include <unistd.h> #include "libc.h" -char *__strchrnul(const char *, int); - static void dummy(char *old, char *new) {} weak_alias(dummy, __env_rm_add); diff --git a/src/env/setenv.c b/src/env/setenv.c index a7dd2b6..c5226b6 100644 --- a/src/env/setenv.c +++ b/src/env/setenv.c @@ -2,9 +2,6 @@ #include <string.h> #include <errno.h> -char *__strchrnul(const char *, int); -int __putenv(char *, size_t, char *); - void __env_rm_add(char *old, char *new) { static char **env_alloced; diff --git a/src/env/unsetenv.c b/src/env/unsetenv.c index 8630e2d..471219e 100644 --- a/src/env/unsetenv.c +++ b/src/env/unsetenv.c @@ -1,10 +1,9 @@ #include <stdlib.h> #include <string.h> #include <errno.h> +#include <unistd.h> #include "libc.h" -char *__strchrnul(const char *, int); - static void dummy(char *old, char *new) {} weak_alias(dummy, __env_rm_add); |