# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/thin-provisioning-tools/hotfix-sys-layout-tests.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- The devicemapper crate pulls devicemapper-sys in as build-dependency, so it is also compiled for the build host. Cargo exports TARGET to all build scripts, thus bindgen generates the bindings for the target ABI in both cases and the emitted layout assertions fail for the host copy, e.g. x32: error[E0080]: index out of bounds: the length is 1 but the index is 4 121 | ["Size of semun"][::std::mem::size_of::() - 4usize]; Only constants and structs are used, so drop the layout assertions. --- thin-provisioning-tools-1.3.3/vendor/devicemapper-sys/build.rs.vanilla 2026-07-25 14:21:37.663259249 +0200 +++ thin-provisioning-tools-1.3.3/vendor/devicemapper-sys/build.rs 2026-07-25 14:21:37.663947282 +0200 @@ -26,6 +26,7 @@ fn main() { let bindings = Builder::default() .rust_target(RUST_VERSION.parse().expect("valid rust version")) .header("dm.h") + .layout_tests(false) .clang_args( libdevmapper .include_paths @@ -55,6 +56,7 @@ fn main() { let bindings = Builder::default() .rust_target(RUST_VERSION.parse().expect("valid rust version")) .header("sem.h") + .layout_tests(false) .default_macro_constant_type(bindgen::MacroTypeVariation::Signed) .allowlist_var("GET.*") .allowlist_var("SET.*")