Skip to content

Commit

Permalink
silence new rust 1.80 warnings
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Luap99 authored and openshift-cherrypick-robot committed Aug 16, 2024
1 parent a4e1359 commit ba4e5a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
}

0 comments on commit ba4e5a4

Please sign in to comment.