summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/syscalls.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-10-22 09:52:24 +0000
committerEric Andersen <andersen@codepoet.org>2003-10-22 09:52:24 +0000
commit8e8099dcac7317d161b4341dbac5369164397f82 (patch)
tree2312442fff8c670f889eee3c3761703aaee9dc06 /libc/sysdeps/linux/common/syscalls.c
parent7845251d593a343097336f09c8a8b93df2ecc697 (diff)
Per suggestion and patch from Ken Staton, emulates poll using
select for older 2.0 kernels where poll is missing.
Diffstat (limited to 'libc/sysdeps/linux/common/syscalls.c')
-rw-r--r--libc/sysdeps/linux/common/syscalls.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/syscalls.c b/libc/sysdeps/linux/common/syscalls.c
index 6e966f525..0cbec3f08 100644
--- a/libc/sysdeps/linux/common/syscalls.c
+++ b/libc/sysdeps/linux/common/syscalls.c
@@ -1721,9 +1721,12 @@ int getresuid (uid_t *ruid, uid_t *euid, uid_t *suid)
#endif
//#define __NR_poll 168
-#if defined(L_poll) && defined(__NR_poll) /* uClinux 2.0 doesn't have poll */
+#if defined(L_poll) && defined(__NR_poll)
#include <sys/poll.h>
_syscall3(int, poll, struct pollfd *, fds, unsigned long int, nfds, int, timeout);
+#else
+/* uClinux 2.0 doesn't have poll, emulate it using select */
+#include "poll.c"
#endif
//#define __NR_nfsservctl 169