diff options
| author | Ossi Herrala <[email protected]> | 2018-03-31 20:14:24 +0000 |
|---|---|---|
| committer | Ossi Herrala <[email protected]> | 2018-03-31 20:14:24 +0000 |
| commit | 23ca9d2832ff54bc2067f99473802a3fbead0f3f (patch) | |
| tree | 621e9dde1f9299e39887a6c179d6ff8d5950e124 /openssl-sys/build.rs | |
| parent | Merge pull request #858 from Ralith/stateless-api (diff) | |
| download | rust-openssl-23ca9d2832ff54bc2067f99473802a3fbead0f3f.tar.xz rust-openssl-23ca9d2832ff54bc2067f99473802a3fbead0f3f.zip | |
Add support for LibreSSL 2.7.1
While there, support also future LibreSSL 2.7 versions out of the
box. This fixes compiling this crate in OpenBSD -current.
Diffstat (limited to 'openssl-sys/build.rs')
| -rw-r--r-- | openssl-sys/build.rs | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs index 3f0f934e..d94261a2 100644 --- a/openssl-sys/build.rs +++ b/openssl-sys/build.rs @@ -323,8 +323,12 @@ fn validate_headers(include_dirs: &[PathBuf]) -> Version { #include <openssl/opensslv.h> #include <openssl/opensslconf.h> -#if LIBRESSL_VERSION_NUMBER >= 0x20701000 +#if LIBRESSL_VERSION_NUMBER >= 0x20800000 RUST_LIBRESSL_NEW +#elif LIBRESSL_VERSION_NUMBER >= 0x20702000 +RUST_LIBRESSL_27X +#elif LIBRESSL_VERSION_NUMBER >= 0x20701000 +RUST_LIBRESSL_271 #elif LIBRESSL_VERSION_NUMBER >= 0x20700000 RUST_LIBRESSL_270 #elif LIBRESSL_VERSION_NUMBER >= 0x20603000 @@ -477,11 +481,25 @@ See rust-openssl README for more information: Version::Libressl } else if expanded.contains("RUST_LIBRESSL_270") { println!("cargo:rustc-cfg=libressl"); - println!("cargo:rustc-cfg=libressl270"); + println!("cargo:rustc-cfg=libressl27"); println!("cargo:libressl=true"); println!("cargo:libressl_version=270"); println!("cargo:version=101"); Version::Libressl + } else if expanded.contains("RUST_LIBRESSL_271") { + println!("cargo:rustc-cfg=libressl"); + println!("cargo:rustc-cfg=libressl27"); + println!("cargo:libressl=true"); + println!("cargo:libressl_version=271"); + println!("cargo:version=101"); + Version::Libressl + } else if expanded.contains("RUST_LIBRESSL_27X") { + println!("cargo:rustc-cfg=libressl"); + println!("cargo:rustc-cfg=libressl27"); + println!("cargo:libressl=true"); + println!("cargo:libressl_version=27x"); + println!("cargo:version=101"); + Version::Libressl } else if expanded.contains("RUST_OPENSSL_111") { println!("cargo:rustc-cfg=ossl111"); println!("cargo:rustc-cfg=ossl110"); @@ -510,7 +528,7 @@ See rust-openssl README for more information: " This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5 -and 2.6, but a different version of OpenSSL was found. The build is now aborting +through 2.7, but a different version of OpenSSL was found. The build is now aborting due to this version mismatch. " |