diff options
| author | Steven Fackler <[email protected]> | 2015-02-05 21:04:18 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2015-02-05 21:04:18 -0800 |
| commit | d06f226b3f7fd3517ea2299abebd7df031c1a428 (patch) | |
| tree | 460de4005e2f5833766ee3e872e7d5c1ae6fc79f /openssl-sys/build.rs | |
| parent | Release v0.3.1 (diff) | |
| download | rust-openssl-d06f226b3f7fd3517ea2299abebd7df031c1a428.tar.xz rust-openssl-d06f226b3f7fd3517ea2299abebd7df031c1a428.zip | |
Fix deprecation warnings in openssl-sys
Diffstat (limited to 'openssl-sys/build.rs')
| -rw-r--r-- | openssl-sys/build.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs index a5d3f2d1..a7b39e84 100644 --- a/openssl-sys/build.rs +++ b/openssl-sys/build.rs @@ -1,11 +1,11 @@ -#![feature(core, collections, os)] +#![feature(core, collections, env)] extern crate "pkg-config" as pkg_config; -use std::os; +use std::env; fn main() { - let target = os::getenv("TARGET").unwrap(); + let target = env::var_string("TARGET").unwrap(); let is_android = target.find_str("android").is_some(); // Without hackory, pkg-config will only look for host libraries. @@ -32,9 +32,10 @@ fn main() { } if is_android { - let path = os::getenv("OPENSSL_PATH").expect("Android does not provide openssl libraries, please \ - build them yourselves (instructions in the README) \ - and provide their location through $OPENSSL_PATH."); + let path = env::var_string("OPENSSL_PATH").ok() + .expect("Android does not provide openssl libraries, please build them yourselves \ + (instructions in the README) and provide their location through \ + $OPENSSL_PATH."); flags.push_str(format!(" -L {}", path).as_slice()); } |