From a57515bb4c2b874e3b5db88bf5906a051de181af Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 25 Dec 2017 22:18:14 -0500 Subject: [PATCH] Add musl libc definitions to: src_core_sys_posix_poll --- src/core/sys/posix/poll.d | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/core/sys/posix/poll.d b/src/core/sys/posix/poll.d index 4e67b4a37e..f1379c65d2 100644 --- a/src/core/sys/posix/poll.d +++ b/src/core/sys/posix/poll.d @@ -271,3 +271,30 @@ else version( CRuntime_Bionic ) int poll(pollfd*, nfds_t, c_long); } +else version( CRuntime_Musl ) +{ + struct pollfd + { + int fd; + short events; + short revents; + } + + alias uint nfds_t; + + enum + { + POLLIN = 0x001, + POLLPRI = 0x002, + POLLOUT = 0x004, + POLLERR = 0x008, + POLLHUP = 0x010, + POLLNVAL = 0x020, + POLLRDNORM = 0x040, + POLLRDBAND = 0x080, + POLLWRNORM = 0x100, + POLLWRBAND = 0x200, + } + + int poll(pollfd*, nfds_t, c_long); +}