From 9a1595d5cbf1d1d8a9b94346543a8ddae2bee0be Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Wed, 10 Apr 2024 10:42:49 +0300 Subject: [PATCH] added some linking config for macos --- librocksdb-sys/build.rs | 2 ++ src/env.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/librocksdb-sys/build.rs b/librocksdb-sys/build.rs index 34930c2..77541b9 100644 --- a/librocksdb-sys/build.rs +++ b/librocksdb-sys/build.rs @@ -11,6 +11,8 @@ fn link(name: &str, bundled: bool) { let dir = var("CARGO_MANIFEST_DIR").unwrap(); println!("cargo:rustc-link-search=native={}/{}", dir, target[0]); } + } else if target.get(2) == Some(&"darwin") { + println!("cargo:rustc-link-arg=-mmacosx-version-min=10.14"); } } diff --git a/src/env.rs b/src/env.rs index f8f89cb..22a6151 100644 --- a/src/env.rs +++ b/src/env.rs @@ -49,7 +49,7 @@ impl Env { } } - /// Returns encrypted env. they key must be a 32 bytes long array of u8 + /// Returns encrypted env. the key must be a 32 bytes long array of u8 pub fn enc_env(key: [u8; 32]) -> Result { let env = unsafe { ffi::rocksdb_create_encrypted_env(opt_bytes_to_ptr(Some(&key))) }; if env.is_null() {