Once we've removed all of the Linux-specific stuff, we should look into running this on FreeBSD.
A big question here is what to do with sd_event, which is implemented with epoll and exposed in the sd_bus interface as
sd_bus_(attach|detach|get)_event
.Maintaining a kqueue implementation in parallel seems like a pain. A portable version implies stripping the sd_event API a bit, which likely drops e.g. sd_event_get_fd, in which case we need to do something new to allow nested event loops.
We could go with epoll-shim at first.