File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/unix/bsd/freebsdlike/dragonfly Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ pub type sem_t = *mut sem;
1919
2020pub enum sem { }
2121
22+ use dox:: mem;
23+
2224s ! {
2325
2426 pub struct exit_status {
@@ -799,25 +801,25 @@ f! {
799801 }
800802
801803 pub fn CMSG_LEN ( length: :: c_uint) -> :: c_uint {
802- _CMSG_ALIGN( mem:: size_of:: <:: cmsghdr>( ) ) + length as usize
804+ ( _CMSG_ALIGN( mem:: size_of:: <:: cmsghdr>( ) ) + length as usize ) as u32
803805 }
804806
805807 pub fn CMSG_NXTHDR ( mhdr: * const :: msghdr, cmsg: * const :: cmsghdr)
806808 -> * mut :: cmsghdr
807809 {
808- let next = cmsg as usize + _CMSG_ALIGN( ( * cmsg) . cmsg_len)
810+ let next = cmsg as usize + _CMSG_ALIGN( ( * cmsg) . cmsg_len as usize )
809811 + _CMSG_ALIGN( mem:: size_of:: <:: cmsghdr>( ) ) ;
810812 let max = ( * mhdr) . msg_control as usize
811813 + ( * mhdr) . msg_controllen as usize ;
812814 if next <= max {
813- ( cmsg as usize + _CMSG_ALIGN( ( * cmsg) . cmsg_len) ) as * mut :: cmsghdr
815+ ( cmsg as usize + _CMSG_ALIGN( ( * cmsg) . cmsg_len as usize ) ) as * mut :: cmsghdr
814816 } else {
815817 0 as * mut :: cmsghdr
816818 }
817819 }
818820
819821 pub fn CMSG_SPACE ( length: :: c_uint) -> :: c_uint {
820- _CMSG_ALIGN( mem:: size_of:: <:: cmsghdr>( ) ) + _CMSG_ALIGN( length as usize )
822+ ( _CMSG_ALIGN( mem:: size_of:: <:: cmsghdr>( ) ) + _CMSG_ALIGN( length as usize ) ) as u32
821823 }
822824}
823825
You can’t perform that action at this time.
0 commit comments