jiixyj / epoll-shim

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

sizeof(event) not always equal to 12 #41

Open wegank opened 2 years ago

wegank commented 2 years ago

By definition of epoll_event,

https://github.com/jiixyj/epoll-shim/blob/605be8c2e14b21cd73a714fde93ed5f8c08a7a01/include/sys/epoll.h#L46-L52

the following test might fail on non-x86_64 platforms:

https://github.com/jiixyj/epoll-shim/blob/605be8c2e14b21cd73a714fde93ed5f8c08a7a01/test/epoll-test.c#L343-L346

For example, on Linux / macOS on M1 (aarch64), the size should be 16.

wegank commented 2 years ago

Should be fixed by #34.