diff options
author | Paul Holzinger <pholzing@redhat.com> | 2024-08-05 14:54:10 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2024-08-05 16:12:47 +0200 |
commit | f0ae7ef308d0de77c5b72229bbd8f1400a97b180 (patch) | |
tree | 279ff9e5c4796b250c7a4dfd623498b9c4a407cf | |
parent | 43ebe4909445c378c4b20cf5008ef2025ecf4c7e (diff) |
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>
-rw-r--r-- | build.rs | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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}"); } |