Skip to content
Open
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
23 changes: 22 additions & 1 deletion src/unix/hurd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ s! {
pub ifa_flags: c_uint,
pub ifa_addr: *mut crate::sockaddr,
pub ifa_netmask: *mut crate::sockaddr,
pub ifa_ifu: *mut crate::sockaddr, // FIXME(union) This should be a union
pub ifa_ifu: __c_anonymous_ifaddrs_ifa_ifu,
pub ifa_data: *mut c_void,
}

Expand Down Expand Up @@ -1159,6 +1159,27 @@ s_no_extra_traits! {
__wch: c_int,
__wchb: [c_char; 4],
}

pub union __c_anonymous_ifaddrs_ifa_ifu {
ifu_broadaddr: *mut sockaddr,
ifu_dstaddr: *mut sockaddr,
Comment on lines +1164 to +1165

@JohnTitor JohnTitor Nov 17, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it'd be useful to make them public, wouldn't it?

View changes since the review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same as the linux version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point; let me fix first the existing implementations, so this can be done "properly" from the beginning: #5745

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I wasn't aware of that, thank you for the follow-up!

}
}

cfg_if! {
if #[cfg(feature = "extra_traits")] {
impl PartialEq for __c_anonymous_ifaddrs_ifa_ifu {
fn eq(&self, _other: &__c_anonymous_ifaddrs_ifa_ifu) -> bool {
unimplemented!("traits")
}
}
impl Eq for __c_anonymous_ifaddrs_ifa_ifu {}
impl hash::Hash for __c_anonymous_ifaddrs_ifa_ifu {
fn hash<H: hash::Hasher>(&self, _state: &mut H) {
unimplemented!("traits")
}
}
}
}

// const
Expand Down
Loading