From fb578735d6d83c9f33814ecacd03ebb4466a4d80 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Sun, 22 Oct 2023 00:46:14 +0200 Subject: [PATCH 1/2] Add missing libressl382 config to openssl/build.rs In 04ffe960 and ae74dec45 I added conditionals on libressl382 but missed the build script. --- openssl/build.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openssl/build.rs b/openssl/build.rs index 93ef534d27..19cb17e2ac 100644 --- a/openssl/build.rs +++ b/openssl/build.rs @@ -69,6 +69,9 @@ fn main() { if version >= 0x3_08_00_00_0 { println!("cargo:rustc-cfg=libressl380"); } + if version >= 0x3_08_02_00_0 { + println!("cargo:rustc-cfg=libressl382"); + } } if let Ok(vars) = env::var("DEP_OPENSSL_CONF") { From a44fa61c537a72bfd2ac89bf755b1995215f23a8 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Sun, 22 Oct 2023 00:50:28 +0200 Subject: [PATCH 2/2] Remove stale near-duplicate version parser The DEP_OPENSSL_LIBRESSL_VERSION_NUMBER handling has two near-duplicate parsers. The new one added in 4ecaf691 was subsequently extended and the old one went stale: libressl250, 310, 370, 380 are missing from it. --- openssl/build.rs | 56 ------------------------------------------------ 1 file changed, 56 deletions(-) diff --git a/openssl/build.rs b/openssl/build.rs index 19cb17e2ac..87a9fa06f5 100644 --- a/openssl/build.rs +++ b/openssl/build.rs @@ -111,60 +111,4 @@ fn main() { println!("cargo:rustc-cfg=ossl320"); } } - - if let Ok(version) = env::var("DEP_OPENSSL_LIBRESSL_VERSION_NUMBER") { - let version = u64::from_str_radix(&version, 16).unwrap(); - - if version >= 0x2_05_01_00_0 { - println!("cargo:rustc-cfg=libressl251"); - } - - if version >= 0x2_06_01_00_0 { - println!("cargo:rustc-cfg=libressl261"); - } - - if version >= 0x2_07_00_00_0 { - println!("cargo:rustc-cfg=libressl270"); - } - - if version >= 0x2_07_01_00_0 { - println!("cargo:rustc-cfg=libressl271"); - } - - if version >= 0x2_07_03_00_0 { - println!("cargo:rustc-cfg=libressl273"); - } - - if version >= 0x2_08_00_00_0 { - println!("cargo:rustc-cfg=libressl280"); - } - - if version >= 0x2_09_01_00_0 { - println!("cargo:rustc-cfg=libressl291"); - } - - if version >= 0x3_02_01_00_0 { - println!("cargo:rustc-cfg=libressl321"); - } - - if version >= 0x3_03_02_00_0 { - println!("cargo:rustc-cfg=libressl332"); - } - - if version >= 0x3_04_00_00_0 { - println!("cargo:rustc-cfg=libressl340"); - } - - if version >= 0x3_05_00_00_0 { - println!("cargo:rustc-cfg=libressl350"); - } - - if version >= 0x3_06_00_00_0 { - println!("cargo:rustc-cfg=libressl360"); - } - - if version >= 0x3_06_01_00_0 { - println!("cargo:rustc-cfg=libressl361"); - } - } }