From 64b8d39133a0c72de6e87f9436f07e089591a826 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 23 Mar 2006 11:17:41 +0000 Subject: Mark some functions as BSD only --- libc/sysdeps/linux/common/acct.c | 2 ++ libc/sysdeps/linux/common/chroot.c | 2 ++ libc/sysdeps/linux/common/getdnnm.c | 8 ++++---- libc/sysdeps/linux/common/madvise.c | 2 +- libc/sysdeps/linux/common/setdomainname.c | 2 ++ libc/sysdeps/linux/common/setgroups.c | 3 +++ libc/sysdeps/linux/common/sethostname.c | 2 ++ libc/sysdeps/linux/common/settimeofday.c | 3 +++ libc/sysdeps/linux/common/vhangup.c | 2 ++ 9 files changed, 21 insertions(+), 5 deletions(-) (limited to 'libc/sysdeps/linux/common') 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 +#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 #include +#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 #include -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 -#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 +#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 #include +#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 +#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 +#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 +#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98) _syscall0(int, vhangup); +#endif -- cgit v1.2.3