From 3f949b88a055eb2745547f4eae3a86648b8a31e2 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 21 Jan 2004 20:27:25 +0000 Subject: Move poll to its own file, rather than being only half in its own file --- libc/sysdeps/linux/common/poll.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libc/sysdeps/linux/common/poll.c') diff --git a/libc/sysdeps/linux/common/poll.c b/libc/sysdeps/linux/common/poll.c index cf3db35eb..9896ef858 100644 --- a/libc/sysdeps/linux/common/poll.c +++ b/libc/sysdeps/linux/common/poll.c @@ -17,6 +17,14 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef __NR_poll + +#include "syscalls.h" +#include +_syscall3(int, poll, struct pollfd *, fds, + unsigned long int, nfds, int, timeout); +#else + #include #include #include @@ -26,6 +34,8 @@ #include #include +/* uClinux 2.0 doesn't have poll, emulate it using select */ + /* Poll the file descriptors described by the NFDS structures starting at FDS. If TIMEOUT is nonzero and not -1, allow TIMEOUT milliseconds for an event to occur; if TIMEOUT is -1, block until an event occurs. @@ -190,3 +200,5 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout) return ready; } +#endif + -- cgit v1.2.3