fix openbsd

master
Niko PLP 1 year ago
parent 347ba0e3a4
commit 8c2d83c48f
  1. 6
      librocksdb-sys/Cargo.toml
  2. 1
      librocksdb-sys/build.rs
  3. 2
      librocksdb-sys/src/lib.rs

@ -16,7 +16,7 @@ links = "rocksdb"
default = [ "static" ]
jemalloc = ["tikv-jemalloc-sys"]
static = ["libz-sys?/static", "bzip2-sys?/static"]
io-uring = ["pkg-config"]
io-uring = []
snappy = []
lz4 = ["lz4-sys"]
zstd = ["zstd-sys"]
@ -32,7 +32,7 @@ zstd-sys = { version = "2.0", features = ["zdict_builder"], optional = true }
libz-sys = { version = "1.1", default-features = false, optional = true }
bzip2-sys = { version = "0.1", default-features = false, optional = true }
[target.'cfg(not(any(target_os = "linux",target_os = "darwin")))'.dependencies.openssl]
[target.'cfg(not(any(target_os = "linux",target_os = "darwin",target_os = "openbsd")))'.dependencies.openssl]
version = "0.10"
features = ["vendored"]
@ -44,4 +44,4 @@ uuid = { version = "1.0", features = ["v4"] }
cc = { version = "1.0", features = ["parallel"] }
bindgen = { version = "0.65", default-features = false, features = ["runtime"] }
glob = "0.3"
pkg-config = { version = "0.3", optional = true }
pkg-config = { version = "0.3" }

@ -234,6 +234,7 @@ fn build_rocksdb() {
println!("cargo:rustc-link-arg=-pthread");
config.flag("-fno-builtin-memcmp");
config.define("_REENTRANT", None);
pkg_config::Config::new().probe("openssl").unwrap();
// config.include("rocksdb/plugin/openssl/include");
lib_sources.push("plugin/openssl/openssl_provider.cc");
// let dir = env::var("CARGO_MANIFEST_DIR").unwrap();

@ -24,7 +24,7 @@ extern crate bzip2_sys;
extern crate libz_sys;
#[cfg(feature = "lz4")]
extern crate lz4_sys;
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
#[cfg(not(any(target_os = "linux", target_os = "macos",target_os="openbsd")))]
extern crate openssl;
#[cfg(feature = "zstd")]
extern crate zstd_sys;

Loading…
Cancel
Save