aboutsummaryrefslogtreecommitdiff
path: root/src/unistd
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2013-12-12 05:09:18 +0000
committerSzabolcs Nagy <nsz@port70.net>2013-12-12 05:09:18 +0000
commit571744447c23f91feb6439948f3a619aca850dfb (patch)
tree996c6f90721d69494683ae213ec22784d02a899a /src/unistd
parentac45692a53a1b8d2ede329d91652d43c1fb5dc8d (diff)
downloadmusl-571744447c23f91feb6439948f3a619aca850dfb.zip
musl-571744447c23f91feb6439948f3a619aca850dfb.tar.gz
musl-571744447c23f91feb6439948f3a619aca850dfb.tar.bz2
include cleanups: remove unused headers and add feature test macros
Diffstat (limited to 'src/unistd')
-rw-r--r--src/unistd/ctermid.c2
-rw-r--r--src/unistd/gethostname.c1
-rw-r--r--src/unistd/getlogin_r.c1
-rw-r--r--src/unistd/ttyname_r.c2
-rw-r--r--src/unistd/usleep.c1
5 files changed, 1 insertions, 6 deletions
diff --git a/src/unistd/ctermid.c b/src/unistd/ctermid.c
index ffa9b75..7768405 100644
--- a/src/unistd/ctermid.c
+++ b/src/unistd/ctermid.c
@@ -1,6 +1,4 @@
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <limits.h>
diff --git a/src/unistd/gethostname.c b/src/unistd/gethostname.c
index a406c4e..f984b7d 100644
--- a/src/unistd/gethostname.c
+++ b/src/unistd/gethostname.c
@@ -1,6 +1,5 @@
#include <unistd.h>
#include <sys/utsname.h>
-#include <string.h>
int gethostname(char *name, size_t len)
{
diff --git a/src/unistd/getlogin_r.c b/src/unistd/getlogin_r.c
index 37ce0d4..53866c6 100644
--- a/src/unistd/getlogin_r.c
+++ b/src/unistd/getlogin_r.c
@@ -1,5 +1,4 @@
#include <unistd.h>
-#include <stdlib.h>
#include <string.h>
#include <errno.h>
diff --git a/src/unistd/ttyname_r.c b/src/unistd/ttyname_r.c
index a2ce351..8bac7b2 100644
--- a/src/unistd/ttyname_r.c
+++ b/src/unistd/ttyname_r.c
@@ -1,7 +1,5 @@
#include <unistd.h>
#include <errno.h>
-#include <stdio.h>
-#include <string.h>
void __procfdname(char *, unsigned);
diff --git a/src/unistd/usleep.c b/src/unistd/usleep.c
index ce1c814..6c96652 100644
--- a/src/unistd/usleep.c
+++ b/src/unistd/usleep.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
#include <unistd.h>
#include <time.h>