FFI bindings for poll(2) and select(2) emulation