File tree 1 file changed +6
-4
lines changed
src/unix/bsd/freebsdlike/dragonfly
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;
19
19
20
20
pub enum sem { }
21
21
22
+ use dox:: mem;
23
+
22
24
s ! {
23
25
24
26
pub struct exit_status {
@@ -799,25 +801,25 @@ f! {
799
801
}
800
802
801
803
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
803
805
}
804
806
805
807
pub fn CMSG_NXTHDR ( mhdr: * const :: msghdr, cmsg: * const :: cmsghdr)
806
808
-> * mut :: cmsghdr
807
809
{
808
- let next = cmsg as usize + _CMSG_ALIGN( ( * cmsg) . cmsg_len)
810
+ let next = cmsg as usize + _CMSG_ALIGN( ( * cmsg) . cmsg_len as usize )
809
811
+ _CMSG_ALIGN( mem:: size_of:: <:: cmsghdr>( ) ) ;
810
812
let max = ( * mhdr) . msg_control as usize
811
813
+ ( * mhdr) . msg_controllen as usize ;
812
814
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
814
816
} else {
815
817
0 as * mut :: cmsghdr
816
818
}
817
819
}
818
820
819
821
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
821
823
}
822
824
}
823
825
You can’t perform that action at this time.
0 commit comments