FreeBSDDesktop / epoll-shim

small epoll implementation using kqueue; includes all features needed for libinput/libevdev
MIT License
3 stars 4 forks source link

epoll-shim

This is a small library that implements epoll on top of kqueue. It has been successfully used to port libinput, libevdev, Wayland and more software to FreeBSD: https://www.freshports.org/devel/libepoll-shim/

It may be useful for porting other software that uses epoll as well.

There are some tests inside test/. They should also compile under Linux and can be used to verify proper epoll behavior.

However, this library contains some very ugly hacks and workarounds. For example:

Installation

Run the following commands to build libepoll-shim:

$ mkdir build
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
$ cmake --build .

To run the tests:

$ ctest --output-on-failure

To install (as root):

# cmake --build . --target install