From d1fea08f3f8b4beff9a97631aa19ed0327d2b007 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Fri, 10 Feb 2023 15:17:17 -0600 Subject: [PATCH] Fix build against clang 16 This patch upgrades the `bindgen` dependency to version 0.64 which includes a fix for an upstream issue broken builds when building w/ clang 16 or newer [0]. The use of a wildcard `*` was removed in bindgen 0.62 [1], code has been updated to use the regex approach instead to continue working. [0]: https://github.com/rust-lang/rust-bindgen/pull/2316 [1]: https://github.com/rust-lang/rust-bindgen/issues/2373 --- ffmpeg-sys-the-third/Cargo.toml | 2 +- ffmpeg-sys-the-third/build.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ffmpeg-sys-the-third/Cargo.toml b/ffmpeg-sys-the-third/Cargo.toml index 7067eb3..d416ba6 100644 --- a/ffmpeg-sys-the-third/Cargo.toml +++ b/ffmpeg-sys-the-third/Cargo.toml @@ -26,7 +26,7 @@ libc = "0.2" num_cpus = "1.11" cc = "1.0" pkg-config = "0.3" -bindgen = { version = "0.61", default-features = false, features = ["runtime"] } +bindgen = { version = "0.64", default-features = false, features = ["runtime"] } [target.'cfg(target_env = "msvc")'.build-dependencies] vcpkg = "0.2" diff --git a/ffmpeg-sys-the-third/build.rs b/ffmpeg-sys-the-third/build.rs index b64938d..f5221e5 100644 --- a/ffmpeg-sys-the-third/build.rs +++ b/ffmpeg-sys-the-third/build.rs @@ -1169,9 +1169,9 @@ fn main() { .parse_callbacks(Box::new(Callbacks)); if env::var("CARGO_FEATURE_NON_EXHAUSTIVE_ENUMS").is_ok() { - builder = builder.rustified_non_exhaustive_enum("*"); + builder = builder.rustified_non_exhaustive_enum(".*"); } else { - builder = builder.rustified_enum("*"); + builder = builder.rustified_enum(".*"); } // The input headers we would like to generate