From b0d87fd326c5c825cc6a53e0d9706d9c69d66dfb Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Sun, 13 Aug 2023 20:49:43 +0300 Subject: [PATCH] fix for openbsd and openssl --- librocksdb-sys/build.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/librocksdb-sys/build.rs b/librocksdb-sys/build.rs index 1a13f95..ec44db0 100644 --- a/librocksdb-sys/build.rs +++ b/librocksdb-sys/build.rs @@ -144,7 +144,7 @@ fn build_rocksdb() { // config.flag("-march=haswell"); // 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") { config.include("rocksdb/plugin/openssl/include"); lib_sources.push("plugin/openssl/openssl_provider.cc"); @@ -169,7 +169,7 @@ fn build_rocksdb() { ); println!("cargo:rustc-link-lib=static=ippcp"); } - +} if target.contains("apple-ios") { config.define("OS_MACOSX", None); config.define("IOS_CROSS_COMPILE", None); @@ -230,6 +230,10 @@ fn build_rocksdb() { println!("cargo:rustc-link-arg=-pthread"); config.flag("-fno-builtin-memcmp"); 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") { link("rpcrt4", false); link("shlwapi", false);