Skip to content

Commit 67b92df

Browse files
committed
Fix Linux's CMSG_NXTHDR definition.
This is an error from PR rust-lang#1098. The wrong definition coincidentally works on Linux/glibc, but it fails on Linux/musl.
1 parent fc90925 commit 67b92df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/unix/notbsd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ f! {
999999
if cmsg.is_null() {
10001000
return CMSG_FIRSTHDR(mhdr);
10011001
};
1002-
let pad = mem::align_of::<cmsghdr>() - 1;
1002+
let pad = mem::align_of::<usize>() - 1;
10031003
let next = cmsg as usize + (*cmsg).cmsg_len as usize + pad & !pad;
10041004
let max = (*mhdr).msg_control as usize
10051005
+ (*mhdr).msg_controllen as usize;

0 commit comments

Comments
 (0)