Using epoll is not cross-platform
epoll is a Linux-specific thing, while FreeBSD and NetBSD have epoll-shim which implements epoll through *BSD-specific kqueue, DragonFly BSD and OpenBSD prefer to patch Wayland to use kqueue directly: https://github.com/jrmarino/ravensource/tree/master/bucket_D7/wayland/dragonfly https://github.com/jasperla/openbsd-wip/tree/master/x11/wayland/patches (outdated, see my upgrade next to this link) https://github.com/mazocomp/openbsd-wip/tree/master/graphics/wayland/patches
Wayland is a protocol and it should be OS-independent, I suggest using libevent, it's a cross-platform library which supports epoll, kqueue, /dev/poll, event ports, Windows select, POSIX select and poll. http://libevent.org/ (Tor, Chromium, tmux and more prefer to use libevent). Using epoll directly is a bug which explicitly says: use GNU/Linux or die (or just like FreeBSD and NetBSD do: just implement Linux APIs).