Feature to avoid usage of `memfd_create`
Right now memfd_create appears to be used in a single place gated on certain platforms:
https://github.com/Smithay/wayland-rs/blob/987c54453411a230e0147d2df3ef5354bb581b17/wayland-cursor/src/lib.rs#L439-L451
For other systems there appears to already be a fallback alternative.
Unfortunately, this creates a dependency on glibc > 2.26, which makes this incompatible with the conda build environment, forcing us to disable wayland support for those builds.
Given the minimal scope and existing fallback this seems like it could be a good candidate for a feature flag instead so we could avoid using it on platforms with an older glibc.
So, you're seeing a link error due to glibc not having the memfd_create symbol?
Because I don't think that should happen. (With the latest version of wayland-rs.) rustix should be using direct system calls, unless the use-libc feature is enabled somewhere.
Exactly. We were getting a link error. Thanks for the pointers. I'll check the versions and see if we're using rustix tomorrow -- we might be one version behind.
There might be an older version of wayland-rs somewhere in the dependency tree, from before we moved from nix to rustix.