Skip to content

Commit

Permalink
build.rs: fix warning: unexpected cfg condition value: overwrite
Browse files Browse the repository at this point in the history
warning: unexpected `cfg` condition value: `overwrite`
  --> build.rs:61:15
   |
61 |     #[cfg(not(feature = "overwrite"))]
   |               ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `fat_complete`
   = help: consider adding `overwrite` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition value: `overwrite`
  --> build.rs:64:11
   |
64 |     #[cfg(feature = "overwrite")]
   |           ^^^^^^^^^^^^^^^^^^^^^

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
  • Loading branch information
ming1 committed Dec 25, 2024
1 parent ceb2cc2 commit 296a4f5
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,7 @@ MARK_FIX_753(UBLK_U_CMD_DEL_DEV_ASYNC);
const int Fix753_UBLK_IO_RES_ABORT = UBLK_IO_RES_ABORT;
"#;

#[cfg(not(feature = "overwrite"))]
let outdir = PathBuf::from(env::var("OUT_DIR").unwrap());

#[cfg(feature = "overwrite")]
let outdir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()).join("src/sys");

let mut builder = bindgen::Builder::default();
builder = builder.header_contents("include-file.h", INCLUDE);

Expand Down

0 comments on commit 296a4f5

Please sign in to comment.