From d5e6fb5115a376d9e7c66f3aa5fc2325e90a2300 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 22 Feb 2024 17:21:44 -0600 Subject: [PATCH] move cfg --- openssl-sys/build/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openssl-sys/build/main.rs b/openssl-sys/build/main.rs index 273f2a978..657c2d63b 100644 --- a/openssl-sys/build/main.rs +++ b/openssl-sys/build/main.rs @@ -82,9 +82,8 @@ fn main() { // rerun-if-changed causes openssl-sys to rebuild if the openssl include // dir has changed since the last build. However, this causes a rebuild // every time when vendoring so we disable it. - #[cfg(not(feature = "vendored"))] let potential_path = include_dir.join("openssl"); - if potential_path.exists() { + if potential_path.exists() && !cfg!(feature = "vendored") { if let Some(printable_include) = potential_path.to_str() { println!("cargo:rerun-if-changed={}", printable_include); }