Skip to content

Fix in6_addr alignment on Windows.

Noah requested to merge ngold/libslirp-sys:align into master

The alignment for in6_addr is 2 on Windows, but the original bindings set it to 4 on all platforms. This caused the Rust struct's alignment to differ from what libslirp expected on the C side, which meant that field reads on the C side were looking at potentially random or from its view, corrupted data. Here, we've changed the structure alignment to be correct based upon the platform detected at compile time.

Merge request reports