summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/linux/common/acct.c2
-rw-r--r--libc/sysdeps/linux/common/chroot.c2
-rw-r--r--libc/sysdeps/linux/common/getdnnm.c8
-rw-r--r--libc/sysdeps/linux/common/madvise.c2
-rw-r--r--libc/sysdeps/linux/common/setdomainname.c2
-rw-r--r--libc/sysdeps/linux/common/setgroups.c3
-rw-r--r--libc/sysdeps/linux/common/sethostname.c2
-rw-r--r--libc/sysdeps/linux/common/settimeofday.c3
-rw-r--r--libc/sysdeps/linux/common/vhangup.c2
9 files changed, 21 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/common/acct.c b/libc/sysdeps/linux/common/acct.c
index 5c64623fb..2e7d1c600 100644
--- a/libc/sysdeps/linux/common/acct.c
+++ b/libc/sysdeps/linux/common/acct.c
@@ -9,4 +9,6 @@
#include "syscalls.h"
#include <unistd.h>
+#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
_syscall1(int, acct, const char *, filename);
+#endif
diff --git a/libc/sysdeps/linux/common/chroot.c b/libc/sysdeps/linux/common/chroot.c
index fcf2adac2..527310a15 100644
--- a/libc/sysdeps/linux/common/chroot.c
+++ b/libc/sysdeps/linux/common/chroot.c
@@ -12,6 +12,7 @@
#include <string.h>
#include <sys/param.h>
+#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
#define __NR___syscall_chroot __NR_chroot
static inline _syscall1(int, __syscall_chroot, const char *, path);
@@ -19,3 +20,4 @@ int chroot(const char *path)
{
return __syscall_chroot(path);
}
+#endif
diff --git a/libc/sysdeps/linux/common/getdnnm.c b/libc/sysdeps/linux/common/getdnnm.c
index d4caec6ad..ee1b012c4 100644
--- a/libc/sysdeps/linux/common/getdnnm.c
+++ b/libc/sysdeps/linux/common/getdnnm.c
@@ -11,14 +11,13 @@
#include <errno.h>
#include <sys/utsname.h>
-libc_hidden_proto(getdomainname)
-
+#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
libc_hidden_proto(strlen)
libc_hidden_proto(strcpy)
libc_hidden_proto(uname)
-int
-getdomainname(char *name, size_t len)
+libc_hidden_proto(getdomainname)
+int getdomainname(char *name, size_t len)
{
struct utsname uts;
@@ -45,3 +44,4 @@ getdomainname(char *name, size_t len)
return 0;
}
libc_hidden_def(getdomainname)
+#endif
diff --git a/libc/sysdeps/linux/common/madvise.c b/libc/sysdeps/linux/common/madvise.c
index 70ed9c4cb..8c3918060 100644
--- a/libc/sysdeps/linux/common/madvise.c
+++ b/libc/sysdeps/linux/common/madvise.c
@@ -9,6 +9,6 @@
#include "syscalls.h"
#include <sys/mman.h>
-#ifdef __NR_madvise
+#if defined __NR_madvise && defined __USE_BSD
_syscall3(int, madvise, void *, __addr, size_t, __len, int, __advice);
#endif
diff --git a/libc/sysdeps/linux/common/setdomainname.c b/libc/sysdeps/linux/common/setdomainname.c
index 138250d09..3b9f535e5 100644
--- a/libc/sysdeps/linux/common/setdomainname.c
+++ b/libc/sysdeps/linux/common/setdomainname.c
@@ -9,4 +9,6 @@
#include "syscalls.h"
#include <unistd.h>
+#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
_syscall2(int, setdomainname, const char *, name, size_t, len);
+#endif
diff --git a/libc/sysdeps/linux/common/setgroups.c b/libc/sysdeps/linux/common/setgroups.c
index dd1a03f38..49f3dc61f 100644
--- a/libc/sysdeps/linux/common/setgroups.c
+++ b/libc/sysdeps/linux/common/setgroups.c
@@ -12,6 +12,8 @@
#include <unistd.h>
#include <grp.h>
+#ifdef __USE_BSD
+
libc_hidden_proto(setgroups)
#if defined(__NR_setgroups32)
@@ -62,3 +64,4 @@ ret_error:
#endif
libc_hidden_def(setgroups)
+#endif
diff --git a/libc/sysdeps/linux/common/sethostname.c b/libc/sysdeps/linux/common/sethostname.c
index d8e0789bb..62867fc16 100644
--- a/libc/sysdeps/linux/common/sethostname.c
+++ b/libc/sysdeps/linux/common/sethostname.c
@@ -9,4 +9,6 @@
#include "syscalls.h"
#include <unistd.h>
+#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
_syscall2(int, sethostname, const char *, name, size_t, len);
+#endif
diff --git a/libc/sysdeps/linux/common/settimeofday.c b/libc/sysdeps/linux/common/settimeofday.c
index 2dc2a6a44..a0ae95fa5 100644
--- a/libc/sysdeps/linux/common/settimeofday.c
+++ b/libc/sysdeps/linux/common/settimeofday.c
@@ -10,8 +10,11 @@
#include "syscalls.h"
#include <sys/time.h>
+#ifdef __USE_BSD
+
libc_hidden_proto(settimeofday)
_syscall2(int, settimeofday, const struct timeval *, tv,
const struct timezone *, tz);
libc_hidden_def(settimeofday)
+#endif
diff --git a/libc/sysdeps/linux/common/vhangup.c b/libc/sysdeps/linux/common/vhangup.c
index f6dc0865f..984a09dec 100644
--- a/libc/sysdeps/linux/common/vhangup.c
+++ b/libc/sysdeps/linux/common/vhangup.c
@@ -9,4 +9,6 @@
#include "syscalls.h"
#include <unistd.h>
+#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
_syscall0(int, vhangup);
+#endif