diff options
Diffstat (limited to 'openssl/build.rs')
| -rw-r--r-- | openssl/build.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/openssl/build.rs b/openssl/build.rs index 612322fe..271fb662 100644 --- a/openssl/build.rs +++ b/openssl/build.rs @@ -41,4 +41,16 @@ fn main() { println!("cargo:rustc-cfg=ossl110g"); } } + + if let Ok(version) = env::var("DEP_OPENSSL_LIBRESSL_VERSION_NUMBER") { + let version = u64::from_str_radix(&version, 16).unwrap(); + + if version >= 0x2_06_01_00_0 { + println!("cargo:rustc-cfg=libressl261"); + } + + if version >= 0x2_07_00_00_0 { + println!("cargo:rustc-cfg=libressl270"); + } + } } |