From 4a62adfbafee85cea097bd32c7f7c7aa27f66952 Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Tue, 9 Apr 2024 16:45:59 +0300 Subject: [PATCH] allow rocksdb_ in C API --- librocksdb-sys/build.rs | 3 +++ librocksdb-sys/src/lib.rs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/librocksdb-sys/build.rs b/librocksdb-sys/build.rs index 57264fd..34930c2 100644 --- a/librocksdb-sys/build.rs +++ b/librocksdb-sys/build.rs @@ -37,6 +37,9 @@ fn bindgen_rocksdb() { .blocklist_type("max_align_t") // https://github.com/rust-lang-nursery/rust-bindgen/issues/550 .ctypes_prefix("libc") .size_t_is_usize(true) + .allowlist_function("rocksdb_.*") + .allowlist_type("rocksdb_.*") + .allowlist_var("rocksdb_.*") .generate() .expect("unable to generate rocksdb bindings"); diff --git a/librocksdb-sys/src/lib.rs b/librocksdb-sys/src/lib.rs index 52d557d..701c88d 100644 --- a/librocksdb-sys/src/lib.rs +++ b/librocksdb-sys/src/lib.rs @@ -16,6 +16,7 @@ #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] +#![allow(deref_nullptr)] // Ensure the libraries are linked in, despite it not being used directly #[cfg(feature = "bzip2")] @@ -24,7 +25,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",target_os="openbsd")))] +#[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "openbsd")))] extern crate openssl; #[cfg(feature = "zstd")] extern crate zstd_sys;