On 8/30/2023 10:19 PM, Eric Blake wrote:
On Wed, Aug 30, 2023 at 12:16:07PM -0500, Eric Blake wrote:
error[E0425]: cannot find value `EPOLL_CTL_ADD` in crate `libc`
https://www.reddit.com/r/rust/comments/65kflg/does_rust_have_native_epoll_support/
mentions how epoll is Linux-specific, and has comments about tokio
trying to build on top of mio in order to be platform-independent (mio
uses epoll on Linux where it is available, but does not require epoll
on other platforms).
So I spent a couple hours experimenting with whether I could use
mio::poll instead of epoll, and at least got things compiling on
FreeBSD with the tests still passing on Linux (I'm not quite set up to
actually prove that the tests work on FreeBSD).  Review appreciated:

https://listman.redhat.com/archives/libguestfs/2023-August/032464.html


Interesting. I tried with the polling crate in order to get a cross platform version of epoll. But the disconnect call failes for some reason then.


I'll try to take a look at mio later today.


--

Best regards,
Tage