mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-04-15 08:21:47 -04:00
Call epoll_shim_ppoll() instead of ppoll() on Darwin
This amends ddd348da7e .
Signed-off-by: Liang Qi <cavendish.qi@gmail.com>
This commit is contained in:
parent
f9c13de55d
commit
f785060318
3 changed files with 23 additions and 2 deletions
|
|
@ -39,6 +39,9 @@
|
|||
#ifdef HAVE_SYS_UCRED_H
|
||||
#include <sys/ucred.h>
|
||||
#endif
|
||||
#if defined(__APPLE__) && !defined(EPOLL_SHIM_DISABLE_WRAPPER_MACROS)
|
||||
#include <epoll-shim/detail/poll.h>
|
||||
#endif
|
||||
|
||||
#include "wayland-os.h"
|
||||
|
||||
|
|
@ -273,3 +276,18 @@ wl_os_mremap_maymove(int fd, void *old_data, ssize_t *old_size,
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
wl_os_ppoll(struct pollfd *fds, nfds_t nfds,
|
||||
const struct timespec *timeout_ts, const sigset_t *sigmask)
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
#ifndef EPOLL_SHIM_DISABLE_WRAPPER_MACROS
|
||||
return epoll_shim_ppoll(fds, nfds, timeout_ts, sigmask);
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return ppoll(fds, nfds, timeout_ts, sigmask);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue