// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
use std::{env::var, path::PathBuf};
use bindgen::Builder;
fn main() {
let bindings = Builder::default()
.header("dm-ioctl.h")
.derive_debug(true)
.derive_default(true)
.generate()
.expect("Could not generate bindings");
let mut bindings_path = PathBuf::from(var("OUT_DIR").unwrap());
bindings_path.push("bindings.rs");
bindings
.write_to_file(&bindings_path)
.expect("Could not write bindings to file");
}