summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2010-04-02 09:17:30 -0700
committerAustin Foxley <austinf@cetoncorp.com>2010-04-02 09:17:30 -0700
commitaae3eb9256affb18cff589b52ee26e0a4e557bbd (patch)
tree003711a54e7dfbde0b50979e2942fd3e0d3451c8 /libc/sysdeps/linux/common
parentef18cfe8ebab25f5ef92e81956f50e2dc57df602 (diff)
parent2864786ad884369ab5397be864e9f43d32bc2726 (diff)
Merge commit 'origin/master' into nptl
Conflicts: Makefile.in extra/Configs/Config.in libc/sysdeps/linux/common/bits/kernel-features.h libc/sysdeps/linux/common/poll.c libc/sysdeps/linux/common/sysdep.h libc/sysdeps/linux/sh/sysdep.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/Makefile.in4
-rw-r--r--libc/sysdeps/linux/common/bits/kernel-features.h5
-rw-r--r--libc/sysdeps/linux/common/getdents.c8
-rw-r--r--libc/sysdeps/linux/common/poll.c3
-rw-r--r--libc/sysdeps/linux/common/sysdep.h1
5 files changed, 15 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
index e86dc0c0d..a6fa6d091 100644
--- a/libc/sysdeps/linux/common/Makefile.in
+++ b/libc/sysdeps/linux/common/Makefile.in
@@ -119,7 +119,7 @@ libc-nomulti-y += $(COMMON_OUT)/__syscall_rt_sigaction.o \
$(COMMON_OUT)/stat.o
libc-nomulti-$(UCLIBC_HAS_SSP) += $(COMMON_OUT)/ssp.o
-objclean-y += common_clean
+objclean-y += CLEAN_libc/sysdeps/linux/common
-common_clean:
+CLEAN_libc/sysdeps/linux/common:
$(do_rm) $(addprefix $(COMMON_OUT)/*., o os oS)
diff --git a/libc/sysdeps/linux/common/bits/kernel-features.h b/libc/sysdeps/linux/common/bits/kernel-features.h
index 8481f0640..68b881c09 100644
--- a/libc/sysdeps/linux/common/bits/kernel-features.h
+++ b/libc/sysdeps/linux/common/bits/kernel-features.h
@@ -46,6 +46,11 @@
# define __ASSUME_GETCWD_SYSCALL 1
#endif
+/* When was `poll' introduced? */
+#if __LINUX_KERNEL_VERSION >= 131584
+# define __ASSUME_POLL_SYSCALL 1
+#endif
+
/* Real-time signal became usable in 2.1.70. */
#if __LINUX_KERNEL_VERSION >= 131398
# define __ASSUME_REALTIME_SIGNALS 1
diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c
index 6a38772e8..5dda190a8 100644
--- a/libc/sysdeps/linux/common/getdents.c
+++ b/libc/sysdeps/linux/common/getdents.c
@@ -133,10 +133,6 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes)
return (char *) dp - buf;
}
-#if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64
-attribute_hidden strong_alias(__getdents,__getdents64)
-#endif
-
#elif __WORDSIZE == 32
extern __typeof(__getdents) __getdents64 attribute_hidden;
@@ -167,4 +163,8 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes)
#endif
+#if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64
+attribute_hidden strong_alias(__getdents,__getdents64)
+#endif
+
#endif
diff --git a/libc/sysdeps/linux/common/poll.c b/libc/sysdeps/linux/common/poll.c
index f50e92c8e..4211c26cc 100644
--- a/libc/sysdeps/linux/common/poll.c
+++ b/libc/sysdeps/linux/common/poll.c
@@ -19,6 +19,7 @@
#include <sys/syscall.h>
#include <sys/poll.h>
+#include <bits/kernel-features.h>
#ifdef __UCLIBC_HAS_THREADS_NATIVE__
#include <sysdep-cancel.h>
@@ -26,6 +27,8 @@
#define SINGLE_THREAD_P 1
#endif
+#if defined __ASSUME_POLL_SYSCALL && defined __NR_poll
+
libc_hidden_proto(poll)
#ifdef __NR_poll
diff --git a/libc/sysdeps/linux/common/sysdep.h b/libc/sysdeps/linux/common/sysdep.h
index 23151d914..dae74d7c5 100644
--- a/libc/sysdeps/linux/common/sysdep.h
+++ b/libc/sysdeps/linux/common/sysdep.h
@@ -156,3 +156,4 @@
#define DW_EH_PE_funcrel 0x40
#define DW_EH_PE_aligned 0x50
#define DW_EH_PE_indirect 0x80
+