Auto merge of #2610 - rtzoeller:dfly_cmsg_align, r=Amanieu

Fix _CMSG_ALIGN on DragonFly

Based on the following DragonFly source:
- f6a0403337/sys/sys/socket.h (L480)
- f6a0403337/sys/cpu/x86_64/include/alignbytes.h (L35)

This fixes nix's failing scm tests on DragonFly.
This commit is contained in:
bors 2022-01-04 02:17:46 +00:00
commit f51fd85a81

View file

@ -1348,7 +1348,7 @@ pub const MINCORE_SUPER: ::c_int = 0x20;
const_fn! {
{const} fn _CMSG_ALIGN(n: usize) -> usize {
(n + 3) & !3
(n + ::mem::size_of::<::c_long>()) & !::mem::size_of::<::c_long>()
}
}