Skip to content

Commit f51fd85

Browse files
committed
Auto merge of #2610 - rtzoeller:dfly_cmsg_align, r=Amanieu
Fix _CMSG_ALIGN on DragonFly Based on the following DragonFly source: - https://github.com/DragonFlyBSD/DragonFlyBSD/blob/f6a040333742c20fd088944a507721fda481fe08/sys/sys/socket.h#L480 - https://github.com/DragonFlyBSD/DragonFlyBSD/blob/f6a040333742c20fd088944a507721fda481fe08/sys/cpu/x86_64/include/alignbytes.h#L35 This fixes nix's failing scm tests on DragonFly.
2 parents 3c1eef0 + 67464ff commit f51fd85

File tree

1 file changed

+1
-1
lines changed
  • src/unix/bsd/freebsdlike/dragonfly

1 file changed

+1
-1
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ pub const MINCORE_SUPER: ::c_int = 0x20;
13481348

13491349
const_fn! {
13501350
{const} fn _CMSG_ALIGN(n: usize) -> usize {
1351-
(n + 3) & !3
1351+
(n + ::mem::size_of::<::c_long>()) & !::mem::size_of::<::c_long>()
13521352
}
13531353
}
13541354

0 commit comments

Comments
 (0)