diff options
Diffstat (limited to 'poll/unix/epoll.c')
-rw-r--r-- | poll/unix/epoll.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/poll/unix/epoll.c b/poll/unix/epoll.c index c00a1094d..7e811241d 100644 --- a/poll/unix/epoll.c +++ b/poll/unix/epoll.c @@ -25,9 +25,9 @@ #if defined(HAVE_EPOLL) -static apr_int16_t get_epoll_event(apr_int16_t event) +static unsigned get_epoll_event(apr_int16_t event) { - apr_int16_t rv = 0; + unsigned rv = 0; if (event & APR_POLLIN) rv |= EPOLLIN; @@ -35,12 +35,16 @@ static apr_int16_t get_epoll_event(apr_int16_t event) rv |= EPOLLPRI; if (event & APR_POLLOUT) rv |= EPOLLOUT; +#ifdef EPOLLEXCLUSIVE + if (event & APR_POLLEXCL) + rv |= EPOLLEXCLUSIVE; +#endif /* APR_POLLNVAL is not handled by epoll. EPOLLERR and EPOLLHUP are return-only */ return rv; } -static apr_int16_t get_epoll_revent(apr_int16_t event) +static apr_int16_t get_epoll_revent(unsigned event) { apr_int16_t rv = 0; @@ -123,7 +127,7 @@ static apr_status_t impl_pollset_create(apr_pollset_t *pollset, } #endif - pollset->p = apr_palloc(p, sizeof(apr_pollset_private_t)); + pollset->p = apr_pcalloc(p, sizeof(apr_pollset_private_t)); #if APR_HAS_THREADS if ((flags & APR_POLLSET_THREADSAFE) && !(flags & APR_POLLSET_NOCOPY) && |