From 5fdde8bda3a761c629ffca546f5f65feeda4509c Mon Sep 17 00:00:00 2001 From: Will Date: Thu, 12 Feb 2015 13:05:46 +0900 Subject: [PATCH 1/2] Fix build on *BSD --- openssl-sys/build.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs index a27f5e77..cfeab5ff 100644 --- a/openssl-sys/build.rs +++ b/openssl-sys/build.rs @@ -27,6 +27,13 @@ fn main() { return; } + if target.contains("bsd") { + println!("cargo:rustc-flags=-l crypto -l ssl"); + // going to assume the base system includes a new version of openssl + build_old_openssl_shim(false); + return; + } + if pkg_config::Config::new().atleast_version("1.0.0").find("openssl").is_ok() { build_old_openssl_shim(false); return; From dd261e4305f568efa1548e72446881fafba139e6 Mon Sep 17 00:00:00 2001 From: Will Date: Thu, 12 Feb 2015 13:32:39 +0900 Subject: [PATCH 2/2] Add clarifying comment for BSD special case --- openssl-sys/build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs index cfeab5ff..2e876ba3 100644 --- a/openssl-sys/build.rs +++ b/openssl-sys/build.rs @@ -27,6 +27,7 @@ fn main() { return; } + // pkg-config doesn't know of OpenSSL on FreeBSD 10.1 and OpenBSD uses LibreSSL if target.contains("bsd") { println!("cargo:rustc-flags=-l crypto -l ssl"); // going to assume the base system includes a new version of openssl