File tree 1 file changed +8
-6
lines changed
src/unix/bsd/freebsdlike/dragonfly
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -804,26 +804,28 @@ f! {
804
804
}
805
805
806
806
pub fn CMSG_LEN ( length: :: c_uint) -> :: c_uint {
807
- _CMSG_ALIGN( :: mem:: size_of:: <:: cmsghdr>( ) ) + length as usize
807
+ ( _CMSG_ALIGN( :: mem:: size_of:: <:: cmsghdr>( ) ) + length as usize ) as u32
808
808
}
809
809
810
810
pub fn CMSG_NXTHDR ( mhdr: * const :: msghdr, cmsg: * const :: cmsghdr)
811
811
-> * mut :: cmsghdr
812
812
{
813
- let next = cmsg as usize + _CMSG_ALIGN( ( * cmsg) . cmsg_len)
814
- + _CMSG_ALIGN( :: mem:: size_of:: <:: cmsghdr>( ) ) ;
813
+ let next = cmsg as usize + _CMSG_ALIGN( ( * cmsg) . cmsg_len as usize )
814
+ + _CMSG_ALIGN( :: mem:: size_of:: <:: cmsghdr>( ) ) ;
815
815
let max = ( * mhdr) . msg_control as usize
816
816
+ ( * mhdr) . msg_controllen as usize ;
817
817
if next <= max {
818
- ( cmsg as usize + _CMSG_ALIGN( ( * cmsg) . cmsg_len) ) as * mut :: cmsghdr
818
+ (
819
+ cmsg as usize + _CMSG_ALIGN( ( * cmsg) . cmsg_len as usize )
820
+ ) as * mut :: cmsghdr
819
821
} else {
820
822
0 as * mut :: cmsghdr
821
823
}
822
824
}
823
825
824
826
pub fn CMSG_SPACE ( length: :: c_uint) -> :: c_uint {
825
- _CMSG_ALIGN( :: mem:: size_of:: <:: cmsghdr>( ) ) +
826
- _CMSG_ALIGN( length as usize )
827
+ ( _CMSG_ALIGN( :: mem:: size_of:: <:: cmsghdr>( ) ) +
828
+ _CMSG_ALIGN( length as usize ) ) as u32
827
829
}
828
830
}
829
831
You can’t perform that action at this time.
0 commit comments