Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: warn about
bindgen
versions 0.66.0 and 0.66.1
`bindgen` versions 0.66.0 and 0.66.1 panic due to C string literals with NUL characters [1]: panicked at .cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.66.0/codegen/mod.rs:717:71: called `Result::unwrap()` on an `Err` value: FromBytesWithNulError { kind: InteriorNul(4) } Thus, in preparation for supporting several `bindgen` versions, add a version check to warn the user about it. We could make it an error, but 1) it is going to fail anyway later in the build, 2) we would disable `RUST` automatically, which is also painful, 3) someone could be using a patched `bindgen` at that version, 4) the interior NUL may go away in the headers (however unlikely). Thus just warn about it so that users know why it is failing. In addition, add a test for the new case. Link: rust-lang/rust-bindgen#2567 [1] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Tested-by: Benno Lossin <benno.lossin@proton.me>
- Loading branch information