diff options
| author | Steven Fackler <[email protected]> | 2018-05-19 19:43:02 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2018-05-19 19:57:12 -0700 |
| commit | d991566f2b1b6803ad214fe6bf531d5870ab43fd (patch) | |
| tree | d1d6e42fef37739dde443d8e5a66851a59af1c74 /openssl/build.rs | |
| parent | Merge pull request #921 from eonil/master (diff) | |
| download | rust-openssl-d991566f2b1b6803ad214fe6bf531d5870ab43fd.tar.xz rust-openssl-d991566f2b1b6803ad214fe6bf531d5870ab43fd.zip | |
Support min/max version in LibreSSL
Their implementations of the accessors don't behave expected with no
bounds, so we ignore those bits of the tests.
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"); + } + } } |