1
0
mirror of https://github.com/containers/netavark.git synced 2026-02-05 06:45:56 +01:00

silence new rust 1.80 warnings

A new lint check was added[1] that makes sure all cfg values are checked.
As such we must tell the compiler which values are valid so it doesn't
flag them as unexpected.

[1] https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html#cargorustc-check-cfg-for-buildrsbuild-script

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2024-08-05 14:54:10 +02:00
parent 43ebe49094
commit f0ae7ef308

View File

@@ -75,6 +75,7 @@ fn main() {
"none" => "none",
inv => panic!("Invalid default firewall driver {}", inv),
};
println!("cargo:rustc-check-cfg=cfg(default_fw, values(\"nftables\", \"iptables\", \"none\"))");
println!("cargo:rustc-cfg=default_fw=\"{}\"", fwdriver);
println!("cargo:rustc-env=DEFAULT_FW={fwdriver}");
}