Skip to content

Commit

Permalink
Update OpenSSL initialization check
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Nov 1, 2021
1 parent df64ee4 commit ce56981
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use std::str::FromStr;
fn main() {
// OpenSSL >= 1.1.0 can be initialized concurrently and is initialized correctly by libcurl.
// <= 1.0.2 need locking callbacks, which are provided by openssl_sys::init().
let use_openssl = match env::var("DEP_OPENSSL_VERSION") {
let use_openssl = match env::var("DEP_OPENSSL_VERSION_NUMBER") {
Ok(ver) => {
let ver = u32::from_str(&ver).unwrap();
if ver < 110 {
let version = u64::from_str_radix(&version, 16).unwrap();
if version < 0x1_01_00_00_0 {
println!("cargo:rustc-cfg=need_openssl_init");
}
true
Expand Down

0 comments on commit ce56981

Please sign in to comment.