Skip to content

Commit 8464aec

Browse files
authored
Merge pull request #4101 from tgross35/backport-lentils
[0.2] Backports
2 parents 6a9512f + 35b7004 commit 8464aec

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/unix/aix/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -962,8 +962,6 @@ pub const BPF_X: ::c_int = 8;
962962
// net/if.h
963963
pub const IFNET_SLOWHZ: ::c_int = 1;
964964
pub const IFQ_MAXLEN: ::c_int = 50;
965-
pub const IF_NAMESIZE: ::c_int = 16;
966-
pub const IFNAMSIZ: ::c_int = 16;
967965
pub const IFF_UP: ::c_int = 0x1;
968966
pub const IFF_BROADCAST: ::c_int = 0x2;
969967
pub const IFF_DEBUG: ::c_int = 0x4;
@@ -986,8 +984,6 @@ pub const ARPHRD_ETHER: ::c_int = 1;
986984
pub const ARPHRD_802_5: ::c_int = 6;
987985
pub const ARPHRD_802_3: ::c_int = 6;
988986
pub 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
993989
pub const RTM_ADD: ::c_int = 0x1;

src/unix/bsd/apple/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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 {

src/unix/bsd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ f! {
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

0 commit comments

Comments
 (0)