fix for openbsd and openssl

master
Niko PLP 1 year ago
parent 48cbb13316
commit b0d87fd326
  1. 8
      librocksdb-sys/build.rs

@ -144,7 +144,7 @@ fn build_rocksdb() {
// config.flag("-march=haswell"); // config.flag("-march=haswell");
// the flag has been moved to the darwin. openbsd, freebsd and linux cases below // the flag has been moved to the darwin. openbsd, freebsd and linux cases below
} }
if !target.contains("openbsd") {
if !target.contains("darwin") && !target.contains("linux") { if !target.contains("darwin") && !target.contains("linux") {
config.include("rocksdb/plugin/openssl/include"); config.include("rocksdb/plugin/openssl/include");
lib_sources.push("plugin/openssl/openssl_provider.cc"); lib_sources.push("plugin/openssl/openssl_provider.cc");
@ -169,7 +169,7 @@ fn build_rocksdb() {
); );
println!("cargo:rustc-link-lib=static=ippcp"); println!("cargo:rustc-link-lib=static=ippcp");
} }
}
if target.contains("apple-ios") { if target.contains("apple-ios") {
config.define("OS_MACOSX", None); config.define("OS_MACOSX", None);
config.define("IOS_CROSS_COMPILE", None); config.define("IOS_CROSS_COMPILE", None);
@ -230,6 +230,10 @@ fn build_rocksdb() {
println!("cargo:rustc-link-arg=-pthread"); println!("cargo:rustc-link-arg=-pthread");
config.flag("-fno-builtin-memcmp"); config.flag("-fno-builtin-memcmp");
config.define("_REENTRANT", None); config.define("_REENTRANT", None);
config.include("rocksdb/plugin/openssl/include");
lib_sources.push("plugin/openssl/openssl_provider.cc");
let dir = env::var("CARGO_MANIFEST_DIR").unwrap();
println!("cargo:rustc-link-lib=static=crypto");
} else if target.contains("windows") { } else if target.contains("windows") {
link("rpcrt4", false); link("rpcrt4", false);
link("shlwapi", false); link("shlwapi", false);

Loading…
Cancel
Save