Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,8 @@ s_no_extra_traits! {
pub ifr_name: [::c_char; ::IFNAMSIZ],
#[cfg(libc_union)]
pub ifr_ifru: __c_anonymous_ifr_ifru,
#[cfg(not(libc_union))]
pub ifr_ifru: ::sockaddr,
}
}

Expand Down Expand Up @@ -2977,6 +2979,7 @@ cfg_if! {
impl PartialEq for ifreq {
fn eq(&self, other: &ifreq) -> bool {
self.ifr_name == other.ifr_name
&& self.ifr_ifru == other.ifr_ifru
}
}

Expand All @@ -2986,14 +2989,14 @@ cfg_if! {
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
f.debug_struct("ifreq")
.field("ifr_name", &self.ifr_name)
.field("ifr_ifru", &self.ifr_ifru)
.finish()
}
}

impl ::hash::Hash for ifreq {
fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
self.ifr_name.hash(state);
#[cfg(libc_union)]
self.ifr_ifru.hash(state);
}
}
Expand Down