summaryrefslogtreecommitdiff
path: root/src/misc
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/misc
parentac45692a53a1b8d2ede329d91652d43c1fb5dc8d (diff)
downloadmusl-571744447c23f91feb6439948f3a619aca850dfb.tar.gz
musl-571744447c23f91feb6439948f3a619aca850dfb.tar.bz2
musl-571744447c23f91feb6439948f3a619aca850dfb.tar.xz
musl-571744447c23f91feb6439948f3a619aca850dfb.zip
include cleanups: remove unused headers and add feature test macros
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/get_current_dir_name.c1
-rw-r--r--src/misc/getgrouplist.c1
-rw-r--r--src/misc/getrusage.c1
-rw-r--r--src/misc/initgroups.c6
-rw-r--r--src/misc/nftw.c2
-rw-r--r--src/misc/syslog.c1
-rw-r--r--src/misc/uname.c1
7 files changed, 3 insertions, 10 deletions
diff --git a/src/misc/get_current_dir_name.c b/src/misc/get_current_dir_name.c
index e0f463b5..8576df2c 100644
--- a/src/misc/get_current_dir_name.c
+++ b/src/misc/get_current_dir_name.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <limits.h>
diff --git a/src/misc/getgrouplist.c b/src/misc/getgrouplist.c
index 63557afe..c9a8f090 100644
--- a/src/misc/getgrouplist.c
+++ b/src/misc/getgrouplist.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
#include <grp.h>
#include <string.h>
#include <limits.h>
diff --git a/src/misc/getrusage.c b/src/misc/getrusage.c
index a5cbd757..0aaf0ac7 100644
--- a/src/misc/getrusage.c
+++ b/src/misc/getrusage.c
@@ -1,5 +1,4 @@
#include <sys/resource.h>
-#include <string.h>
#include "syscall.h"
int getrusage(int who, struct rusage *ru)
diff --git a/src/misc/initgroups.c b/src/misc/initgroups.c
index 545d1859..922a9581 100644
--- a/src/misc/initgroups.c
+++ b/src/misc/initgroups.c
@@ -1,11 +1,7 @@
-#include <sys/types.h>
-#include <unistd.h>
+#define _GNU_SOURCE
#include <grp.h>
#include <limits.h>
-int getgrouplist(const char *, gid_t, gid_t *, int *);
-int setgroups(size_t, const gid_t *);
-
int initgroups(const char *user, gid_t gid)
{
gid_t groups[NGROUPS_MAX];
diff --git a/src/misc/nftw.c b/src/misc/nftw.c
index 63d6aff5..b2e84bca 100644
--- a/src/misc/nftw.c
+++ b/src/misc/nftw.c
@@ -2,8 +2,6 @@
#include <dirent.h>
#include <sys/stat.h>
#include <errno.h>
-#include <stdlib.h>
-#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <limits.h>
diff --git a/src/misc/syslog.c b/src/misc/syslog.c
index ba9cc62b..1cd61ce4 100644
--- a/src/misc/syslog.c
+++ b/src/misc/syslog.c
@@ -1,7 +1,6 @@
#include <stdarg.h>
#include <sys/socket.h>
#include <stdio.h>
-#include <fcntl.h>
#include <unistd.h>
#include <syslog.h>
#include <time.h>
diff --git a/src/misc/uname.c b/src/misc/uname.c
index 46db90d3..55ea3420 100644
--- a/src/misc/uname.c
+++ b/src/misc/uname.c
@@ -1,5 +1,4 @@
#include <sys/utsname.h>
-#include <string.h>
#include "syscall.h"
int uname(struct utsname *uts)