From 8e272574b4b91127c92d841d63860ffbd70a2f35 Mon Sep 17 00:00:00 2001 From: ldm0 Date: Sat, 13 Apr 2024 15:54:33 +0800 Subject: [PATCH] Workaround `__mingw_ldbl_type_t` bindgen failure --- build.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.rs b/build.rs index fed7a8b..2c8f0e7 100644 --- a/build.rs +++ b/build.rs @@ -229,6 +229,8 @@ fn generate_bindings(ffmpeg_include_dir: &Path, headers: &[PathBuf]) -> Bindings .parse_callbacks(Box::new(filter_callback)) // Add clang path, for `#include` header finding in bindgen process. .clang_arg(format!("-I{}", ffmpeg_include_dir)) + // Workaround: https://github.com/rust-lang/rust-bindgen/issues/2159 + .blocklist_type("__mingw_ldbl_type_t") // Stop bindgen from prefixing enums .prepend_enum_name(false) },