diff options
Diffstat (limited to 'Libraries/LibC/poll.cpp')
-rw-r--r-- | Libraries/LibC/poll.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Libraries/LibC/poll.cpp b/Libraries/LibC/poll.cpp new file mode 100644 index 0000000000..9394048801 --- /dev/null +++ b/Libraries/LibC/poll.cpp @@ -0,0 +1,12 @@ +#include <Kernel/Syscall.h> +#include <errno.h> +#include <poll.h> + +extern "C" { + +int poll(struct pollfd* fds, int nfds, int timeout) +{ + int rc = syscall(SC_poll, fds, nfds, timeout); + __RETURN_WITH_ERRNO(rc, rc, -1); +} +} |