Skip to content

Commit 3659a6d

Browse files
sthibaultgross35
authored andcommitted
hurd: Fix CMSG_DATA on 64bit systems
This was fixed upstream glibc in https://sourceware.org/git/?p=glibc.git;a=patch;h=cf13f740a91b5bbf6bb60a30b45c2a3933ff1259
1 parent 9ea78dc commit 3659a6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/unix/hurd/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3449,7 +3449,7 @@ f! {
34493449
}
34503450

34513451
pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar {
3452-
cmsg.offset(1) as *mut c_uchar
3452+
(cmsg as *mut c_uchar).offset(CMSG_ALIGN(mem::size_of::<cmsghdr>()) as isize)
34533453
}
34543454

34553455
pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint {

0 commit comments

Comments
 (0)