The nix "ioctl" feature is used by both the blkio and virtio-driver
crates. Neither of them enables it explicitly and this can lead to a
compilation failure:
error[E0432]: unresolved imports `nix::ioctl_none`, `nix::ioctl_read`, `nix::ioctl_write_ptr`
--> virtio-driver/src/transports/vhost_vdpa/vhost_vdpa_kernel.rs:17:15
|
17 | use nix::{ioctl_none, ioctl_read, ioctl_write_ptr, unistd::write};
| ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^ no `ioctl_write_ptr` in the root
| | |
| | no `ioctl_read` in the root
| no `ioctl_none` in the root
error: cannot determine resolution for the macro `ioctl_read`
Fabio Valentini <decathorpe@gmail.com> identified the root cause:
The "virtio-driver" crate depends on nix v0.24 with "default-features
= false", however, the code obviously imports items from "nix" that
are only present if the "ioctl" feature is enabled. This used to work
"by accident" because some other crate in libblkio's dependency tree
used to pull in nix v0.24 with default features enabled. This no
longer seems to be the case (hard to tell what changed, since koschei
was not enabled).
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||
|---|---|---|
| .gitignore | ||
| fix-nix-ioctl-feature.patch | ||
| libblkio.spec | ||
| sources | ||