I am trying to use bindgen to create a Rust binding for a C API. There is no control over the C header files, they have to be used as they are.
When I run the tests for the resulting generated FFI code:
failures:
---- bindgen_test_layout_atsc_table_eit_event stdout ----
thread 'bindgen_test_layout_atsc_table_eit_event' panicked at 'assertion failed: `(left == right)`
left: `88`,
right: `85`: Size of: atsc_table_eit_event', /home/users/russel/Repositories/Git/Masters/Public/Rust_Libdvbv5_Sys/target/debug/build/libdvbv5-sys-fcc87675c741c51c/out/bindings.rs:3:124592
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- bindgen_test_layout_atsc_table_eit_event__bindgen_ty_2 stdout ----
thread 'bindgen_test_layout_atsc_table_eit_event__bindgen_ty_2' panicked at 'assertion failed: `(left == right)`
left: `8`,
right: `5`: Size of: atsc_table_eit_event__bindgen_ty_2', /home/users/russel/Repositories/Git/Masters/Public/Rust_Libdvbv5_Sys/target/debug/build/libdvbv5-sys-fcc87675c741c51c/out/bindings.rs:3:123893
---- bindgen_test_layout_atsc_table_eit_event__bindgen_ty_2__bindgen_ty_1 stdout ----
thread 'bindgen_test_layout_atsc_table_eit_event__bindgen_ty_2__bindgen_ty_1' panicked at 'assertion failed: `(left == right)`
left: `8`,
right: `5`: Size of: atsc_table_eit_event__bindgen_ty_2__bindgen_ty_1', /home/users/russel/Repositories/Git/Masters/Public/Rust_Libdvbv5_Sys/target/debug/build/libdvbv5-sys-fcc87675c741c51c/out/bindings.rs:3:121189
---- bindgen_test_layout_max_align_t stdout ----
thread 'bindgen_test_layout_max_align_t' panicked at 'assertion failed: `(left == right)`
left: `24`,
right: `32`: Size of: max_align_t', /home/users/russel/Repositories/Git/Masters/Public/Rust_Libdvbv5_Sys/target/debug/build/libdvbv5-sys-fcc87675c741c51c/out/bindings.rs:3:459830
failures:
bindgen_test_layout_atsc_table_eit_event
bindgen_test_layout_atsc_table_eit_event__bindgen_ty_2
bindgen_test_layout_atsc_table_eit_event__bindgen_ty_2__bindgen_ty_1
bindgen_test_layout_max_align_t
test result: FAILED. 244 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out
Does anyone have any advice as to how to deal with these sorts of errors?