about summary refs log tree commit diff
path: root/src/linux
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/linux
parentac45692a53a1b8d2ede329d91652d43c1fb5dc8d (diff)
downloadmusl-571744447c23f91feb6439948f3a619aca850dfb.tar.gz
musl-571744447c23f91feb6439948f3a619aca850dfb.tar.xz
musl-571744447c23f91feb6439948f3a619aca850dfb.zip
include cleanups: remove unused headers and add feature test macros
Diffstat (limited to 'src/linux')
-rw-r--r--src/linux/chroot.c1
-rw-r--r--src/linux/clock_adjtime.c2
-rw-r--r--src/linux/klogctl.c1
-rw-r--r--src/linux/personality.c1
-rw-r--r--src/linux/prlimit.c3
-rw-r--r--src/linux/sendfile.c2
-rw-r--r--src/linux/setfsgid.c2
-rw-r--r--src/linux/setfsuid.c2
-rw-r--r--src/linux/setgroups.c1
-rw-r--r--src/linux/sethostname.c1
-rw-r--r--src/linux/setns.c1
-rw-r--r--src/linux/stime.c1
-rw-r--r--src/linux/sysinfo.c3
-rw-r--r--src/linux/wait4.c1
14 files changed, 12 insertions, 10 deletions
diff --git a/src/linux/chroot.c b/src/linux/chroot.c
index 82b4fe75..0e69f145 100644
--- a/src/linux/chroot.c
+++ b/src/linux/chroot.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include "syscall.h"
 
diff --git a/src/linux/clock_adjtime.c b/src/linux/clock_adjtime.c
index 1fc9bef4..056ad6d3 100644
--- a/src/linux/clock_adjtime.c
+++ b/src/linux/clock_adjtime.c
@@ -1,5 +1,3 @@
-#define _GNU_SOURCE
-#include <time.h>
 #include <sys/timex.h>
 #include "syscall.h"
 
diff --git a/src/linux/klogctl.c b/src/linux/klogctl.c
index 209ae742..8102ee64 100644
--- a/src/linux/klogctl.c
+++ b/src/linux/klogctl.c
@@ -1,3 +1,4 @@
+#include <sys/klog.h>
 #include "syscall.h"
 
 int klogctl (int type, char *buf, int len)
diff --git a/src/linux/personality.c b/src/linux/personality.c
index 06851f58..e00cf799 100644
--- a/src/linux/personality.c
+++ b/src/linux/personality.c
@@ -1,3 +1,4 @@
+#include <sys/personality.h>
 #include "syscall.h"
 #ifdef SYS_personality
 int personality(unsigned long persona)
diff --git a/src/linux/prlimit.c b/src/linux/prlimit.c
index 12152484..d1639cca 100644
--- a/src/linux/prlimit.c
+++ b/src/linux/prlimit.c
@@ -1,4 +1,4 @@
-#include <unistd.h>
+#define _GNU_SOURCE
 #include <sys/resource.h>
 #include "syscall.h"
 #include "libc.h"
@@ -8,4 +8,5 @@ int prlimit(pid_t pid, int resource, const struct rlimit *new_limit, struct rlim
 	return syscall(SYS_prlimit64, pid, resource, new_limit, old_limit);
 }
 
+#undef prlimit64
 LFS64(prlimit);
diff --git a/src/linux/sendfile.c b/src/linux/sendfile.c
index 818b19d3..d63f4197 100644
--- a/src/linux/sendfile.c
+++ b/src/linux/sendfile.c
@@ -1,4 +1,4 @@
-#include <unistd.h>
+#include <sys/sendfile.h>
 #include "syscall.h"
 #include "libc.h"
 
diff --git a/src/linux/setfsgid.c b/src/linux/setfsgid.c
index a7ed9e92..ad804225 100644
--- a/src/linux/setfsgid.c
+++ b/src/linux/setfsgid.c
@@ -1,4 +1,4 @@
-#include <unistd.h>
+#include <sys/fsuid.h>
 #include "syscall.h"
 #include "libc.h"
 
diff --git a/src/linux/setfsuid.c b/src/linux/setfsuid.c
index 1509e0aa..86358731 100644
--- a/src/linux/setfsuid.c
+++ b/src/linux/setfsuid.c
@@ -1,4 +1,4 @@
-#include <unistd.h>
+#include <sys/fsuid.h>
 #include "syscall.h"
 #include "libc.h"
 
diff --git a/src/linux/setgroups.c b/src/linux/setgroups.c
index 9758940a..1248fdbf 100644
--- a/src/linux/setgroups.c
+++ b/src/linux/setgroups.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include "syscall.h"
 
diff --git a/src/linux/sethostname.c b/src/linux/sethostname.c
index 79a87078..9313b324 100644
--- a/src/linux/sethostname.c
+++ b/src/linux/sethostname.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include "syscall.h"
 
diff --git a/src/linux/setns.c b/src/linux/setns.c
index 7029b748..0afec813 100644
--- a/src/linux/setns.c
+++ b/src/linux/setns.c
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <sched.h>
 #include "syscall.h"
-#include "libc.h"
 
 int setns(int fd, int nstype)
 {
diff --git a/src/linux/stime.c b/src/linux/stime.c
index 6a7e9e81..29a1ec64 100644
--- a/src/linux/stime.c
+++ b/src/linux/stime.c
@@ -1,4 +1,5 @@
 #define _GNU_SOURCE
+#include <time.h>
 #include <sys/time.h>
 
 int stime(time_t *t)
diff --git a/src/linux/sysinfo.c b/src/linux/sysinfo.c
index 2dbd0ad9..7e64f330 100644
--- a/src/linux/sysinfo.c
+++ b/src/linux/sysinfo.c
@@ -1,7 +1,6 @@
+#include <sys/sysinfo.h>
 #include "syscall.h"
 
-struct sysinfo;
-
 int sysinfo(struct sysinfo *info)
 {
 	return syscall(SYS_sysinfo, info);
diff --git a/src/linux/wait4.c b/src/linux/wait4.c
index b3ae75e3..97f12cc5 100644
--- a/src/linux/wait4.c
+++ b/src/linux/wait4.c
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <sys/wait.h>
 #include <sys/resource.h>
-#include <string.h>
 #include "syscall.h"
 
 pid_t wait4(pid_t pid, int *status, int options, struct rusage *usage)