File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -962,8 +962,6 @@ pub const BPF_X: ::c_int = 8;
962
962
// net/if.h
963
963
pub const IFNET_SLOWHZ : :: c_int = 1 ;
964
964
pub const IFQ_MAXLEN : :: c_int = 50 ;
965
- pub const IF_NAMESIZE : :: c_int = 16 ;
966
- pub const IFNAMSIZ : :: c_int = 16 ;
967
965
pub const IFF_UP : :: c_int = 0x1 ;
968
966
pub const IFF_BROADCAST : :: c_int = 0x2 ;
969
967
pub const IFF_DEBUG : :: c_int = 0x4 ;
@@ -986,8 +984,6 @@ pub const ARPHRD_ETHER: ::c_int = 1;
986
984
pub const ARPHRD_802_5 : :: c_int = 6 ;
987
985
pub const ARPHRD_802_3 : :: c_int = 6 ;
988
986
pub const ARPHRD_FDDI : :: c_int = 1 ;
989
- pub const ARPOP_REQUEST : :: c_int = 1 ;
990
- pub const ARPOP_REPLY : :: c_int = 2 ;
991
987
992
988
// net/route.h
993
989
pub const RTM_ADD : :: c_int = 0x1 ;
Original file line number Diff line number Diff line change @@ -5760,19 +5760,19 @@ f! {
5760
5760
return :: CMSG_FIRSTHDR ( mhdr) ;
5761
5761
} ;
5762
5762
let cmsg_len = ( * cmsg) . cmsg_len as usize ;
5763
- let next = cmsg as usize + __DARWIN_ALIGN32( cmsg_len as usize ) ;
5763
+ let next = cmsg as usize + __DARWIN_ALIGN32( cmsg_len) ;
5764
5764
let max = ( * mhdr) . msg_control as usize
5765
5765
+ ( * mhdr) . msg_controllen as usize ;
5766
5766
if next + __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) > max {
5767
- 0 as * mut :: cmsghdr
5767
+ core :: ptr :: null_mut ( )
5768
5768
} else {
5769
5769
next as * mut :: cmsghdr
5770
5770
}
5771
5771
}
5772
5772
5773
5773
pub fn CMSG_DATA ( cmsg: * const :: cmsghdr) -> * mut :: c_uchar {
5774
5774
( cmsg as * mut :: c_uchar)
5775
- . offset ( __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) as isize )
5775
+ . add ( __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) )
5776
5776
}
5777
5777
5778
5778
pub { const } fn CMSG_SPACE ( length: :: c_uint) -> :: c_uint {
Original file line number Diff line number Diff line change 591
591
if ( * mhdr) . msg_controllen as usize >= :: mem:: size_of:: <:: cmsghdr>( ) {
592
592
( * mhdr) . msg_control as * mut :: cmsghdr
593
593
} else {
594
- 0 as * mut :: cmsghdr
594
+ core :: ptr :: null_mut ( )
595
595
}
596
596
}
597
597
You can’t perform that action at this time.
0 commit comments