aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2015-11-28 18:40:20 -0500
committerSteven Fackler <[email protected]>2015-11-28 18:40:20 -0500
commitf26e82386f3789334367f5df81923bc1f30ae9b8 (patch)
tree1fb5ee2b8dd852bfe9147530301aa75da71b40dd
parentImplement try_clone for MaybeSslStream (diff)
parentAvoid empty include paths (i.e. cc -I "" ) as they are not supported by GCC. ... (diff)
downloadrust-openssl-f26e82386f3789334367f5df81923bc1f30ae9b8.tar.xz
rust-openssl-f26e82386f3789334367f5df81923bc1f30ae9b8.zip
Merge pull request #312 from maximih/master
Fix #311 - Avoid empty include paths
-rw-r--r--openssl-sys/build.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs
index d8399c54..0e3a76d2 100644
--- a/openssl-sys/build.rs
+++ b/openssl-sys/build.rs
@@ -15,8 +15,11 @@ fn main() {
// rustc doesn't seem to work with pkg-config's output in mingw64
if !target.contains("windows") {
if let Ok(info) = pkg_config::find_library("openssl") {
- let paths = env::join_paths(info.include_paths).unwrap();
- println!("cargo:include={}", paths.to_str().unwrap());
+ // avoid empty include paths as they are not supported by GCC
+ if info.include_paths.len() > 0 {
+ let paths = env::join_paths(info.include_paths).unwrap();
+ println!("cargo:include={}", paths.to_str().unwrap());
+ }
return;
}
}