diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs index c41faf01..6c090a99 100644 --- a/bindings/rust/build.rs +++ b/bindings/rust/build.rs @@ -2,8 +2,10 @@ fn main() { let src_dir = std::path::Path::new("src"); let mut c_config = cc::Build::new(); - c_config.flag("-Wno-unused-parameter"); - c_config.std("c11").include(src_dir); + c_config + .std("c11") + .include(src_dir) + .flag_if_supported("-Wno-unused-parameter"); #[cfg(target_env = "msvc")] c_config.flag("-utf-8");