Skip to content

bindgen: backport 'codegen: Generate CStr only if possible' from v0.68.0

Noisy Coil requested to merge NoisyCoil/debcargo-conf:bindgen-cstr into master

As per (my) bug report #1069047 and upstream bug #2566, commit 46a08b0 introduced a regression in bindgen v0.66 that makes it fail if a string contains an interior null character. The regression was fixed in v0.68, but I know there are no plans to bump bindgen's version in the debian archive in the near future. This MR backports the upstream patch, PR#2567, to v0.66, with excluded new tests and the path of the single file it changes adapted to the rust-bindgen source package.

The bug fixed by this MR is the single thing preventing the Asahi kernel from building in unstable/testing. In order to fully fix it, rust-bindgen-cli will also need to be rebuilt using the patched librust-bindgen-dev, so I added a changelog entry with matching version for that too. For testing purposes, you can find the debian files for building and packaging the Asahi kernel here (debian/bin/genorig.py https://github.com/AsahiLinux/linux.git and then debian/rules orig to get the source code).

Merge request reports

Loading