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;
962962// net/if.h
963963pub const IFNET_SLOWHZ : :: c_int = 1 ;
964964pub const IFQ_MAXLEN : :: c_int = 50 ;
965- pub const IF_NAMESIZE : :: c_int = 16 ;
966- pub const IFNAMSIZ : :: c_int = 16 ;
967965pub const IFF_UP : :: c_int = 0x1 ;
968966pub const IFF_BROADCAST : :: c_int = 0x2 ;
969967pub const IFF_DEBUG : :: c_int = 0x4 ;
@@ -986,8 +984,6 @@ pub const ARPHRD_ETHER: ::c_int = 1;
986984pub const ARPHRD_802_5 : :: c_int = 6 ;
987985pub const ARPHRD_802_3 : :: c_int = 6 ;
988986pub const ARPHRD_FDDI : :: c_int = 1 ;
989- pub const ARPOP_REQUEST : :: c_int = 1 ;
990- pub const ARPOP_REPLY : :: c_int = 2 ;
991987
992988// net/route.h
993989pub const RTM_ADD : :: c_int = 0x1 ;
Original file line number Diff line number Diff line change @@ -5760,19 +5760,19 @@ f! {
57605760 return :: CMSG_FIRSTHDR ( mhdr) ;
57615761 } ;
57625762 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) ;
57645764 let max = ( * mhdr) . msg_control as usize
57655765 + ( * mhdr) . msg_controllen as usize ;
57665766 if next + __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) > max {
5767- 0 as * mut :: cmsghdr
5767+ core :: ptr :: null_mut ( )
57685768 } else {
57695769 next as * mut :: cmsghdr
57705770 }
57715771 }
57725772
57735773 pub fn CMSG_DATA ( cmsg: * const :: cmsghdr) -> * mut :: c_uchar {
57745774 ( cmsg as * mut :: c_uchar)
5775- . offset ( __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) as isize )
5775+ . add ( __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) )
57765776 }
57775777
57785778 pub { const } fn CMSG_SPACE ( length: :: c_uint) -> :: c_uint {
Original file line number Diff line number Diff line change 591591 if ( * mhdr) . msg_controllen as usize >= :: mem:: size_of:: <:: cmsghdr>( ) {
592592 ( * mhdr) . msg_control as * mut :: cmsghdr
593593 } else {
594- 0 as * mut :: cmsghdr
594+ core :: ptr :: null_mut ( )
595595 }
596596 }
597597
You can’t perform that action at this time.
0 commit comments