Skip to content

Commit

Permalink
Fix Linux's CMSG_NXTHDR definition.
Browse files Browse the repository at this point in the history
This is an error from PR rust-lang#1098.  The wrong definition coincidentally
works on Linux/glibc, but it fails on Linux/musl.
  • Loading branch information
asomers committed Jan 31, 2019
1 parent fc90925 commit 67b92df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unix/notbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ f! {
if cmsg.is_null() {
return CMSG_FIRSTHDR(mhdr);
};
let pad = mem::align_of::<cmsghdr>() - 1;
let pad = mem::align_of::<usize>() - 1;
let next = cmsg as usize + (*cmsg).cmsg_len as usize + pad & !pad;
let max = (*mhdr).msg_control as usize
+ (*mhdr).msg_controllen as usize;
Expand Down

0 comments on commit 67b92df

Please sign in to comment.