summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2024-08-05 14:54:10 +0200
committerPaul Holzinger <pholzing@redhat.com>2024-08-05 16:12:47 +0200
commitf0ae7ef308d0de77c5b72229bbd8f1400a97b180 (patch)
tree279ff9e5c4796b250c7a4dfd623498b9c4a407cf
parent43ebe4909445c378c4b20cf5008ef2025ecf4c7e (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.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/build.rs b/build.rs
index 4dd01e5..bcc9c64 100644
--- a/build.rs
+++ b/build.rs
@@ -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}");
}