[git commit 0_9_30] poll: unavailable on linux < 2.2.0
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Thu Mar 4 11:59:10 UTC 2010
commit: http://git.uclibc.org/uClibc/commit/?id=a7a21c57f0ef555f926ae60ce3941d487811a00a
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0_9_30
fixes bug #253
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
libc/sysdeps/linux/common/bits/kernel-features.h | 5 +++++
libc/sysdeps/linux/common/poll.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/libc/sysdeps/linux/common/bits/kernel-features.h b/libc/sysdeps/linux/common/bits/kernel-features.h
index 88a7182..62042d3 100644
--- a/libc/sysdeps/linux/common/bits/kernel-features.h
+++ b/libc/sysdeps/linux/common/bits/kernel-features.h
@@ -28,6 +28,11 @@
#include <linux/version.h>
#define __LINUX_KERNEL_VERSION LINUX_VERSION_CODE
+/* 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/poll.c b/libc/sysdeps/linux/common/poll.c
index 256581c..b361d99 100644
--- a/libc/sysdeps/linux/common/poll.c
+++ b/libc/sysdeps/linux/common/poll.c
@@ -19,10 +19,11 @@
#include <sys/syscall.h>
#include <sys/poll.h>
+#include <bits/kernel-features.h>
extern __typeof(poll) __libc_poll;
-#ifdef __NR_poll
+#if defined __ASSUME_POLL_SYSCALL && defined __NR_poll
# define __NR___libc_poll __NR_poll
_syscall3(int, __libc_poll, struct pollfd *, fds,
--
1.6.3.3
More information about the uClibc-cvs
mailing list