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>
The overall license of the libblkio binary is not just the Apache-2.0 OR
MIT license of the libblkio code, but also that of all crate
dependencies.
The licenses were determined as follows:
$ cargo license
(MIT OR Apache-2.0) AND BSD-3-Clause (1): virtio-driver
(MIT OR Apache-2.0) AND Unicode-DFS-2016 (1): unicode-ident
Apache-2.0 OR BSD-3-Clause (1): virtio-bindings
Apache-2.0 OR MIT (17): autocfg, bitflags, blkio, cc, cfg-if, concat-idents, const-cstr, io-uring, lazy_static, libblkio, libc, memmap2, num-traits, pci-driver, proc-macro2, quote, syn
MIT (1): nix
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>