diff options
Diffstat (limited to 'rust-src/bch_bindgen')
-rw-r--r-- | rust-src/bch_bindgen/build.rs | 6 | ||||
-rw-r--r-- | rust-src/bch_bindgen/src/libbcachefs_wrapper.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/rust-src/bch_bindgen/build.rs b/rust-src/bch_bindgen/build.rs index 79337a0f..d9805a8d 100644 --- a/rust-src/bch_bindgen/build.rs +++ b/rust-src/bch_bindgen/build.rs @@ -10,6 +10,8 @@ impl bindgen::callbacks::ParseCallbacks for Fix753 { fn main() { use std::path::PathBuf; + println!("cargo:rerun-if-changed=src/libbcachefs_wrapper.h"); + let out_dir: PathBuf = std::env::var_os("OUT_DIR") .expect("ENV Var 'OUT_DIR' Expected") .into(); @@ -44,6 +46,10 @@ fn main() { .default_enum_style(bindgen::EnumVariation::Rust { non_exhaustive: true, }) + .allowlist_function("bcachefs_usage") + .allowlist_function("raid_init") + .allowlist_function("cmd_.*") + .allowlist_function(".*_cmds") .allowlist_function(".*bch2_.*") .allowlist_function("bio_.*") .allowlist_function("derive_passphrase") diff --git a/rust-src/bch_bindgen/src/libbcachefs_wrapper.h b/rust-src/bch_bindgen/src/libbcachefs_wrapper.h index e68de664..5fb42613 100644 --- a/rust-src/bch_bindgen/src/libbcachefs_wrapper.h +++ b/rust-src/bch_bindgen/src/libbcachefs_wrapper.h @@ -11,6 +11,8 @@ #include "../crypto.h" #include "../include/linux/bio.h" #include "../include/linux/blkdev.h" +#include "../cmds.h" +#include "../raid/raid.h" #define MARK_FIX_753(req_name) const blk_mode_t Fix753_##req_name = req_name; |