Skip to content

Commit abbcdf0

Browse files
sthibaulSteveLauC
andauthored
hurd: Enable ifaddrs (#2697)
* hurd: Enable ifaddrs * changelog --------- Co-authored-by: Steve Lau <[email protected]>
1 parent 9f17883 commit abbcdf0

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

changelog/2697.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Enable module `ifaddrs` on GNU Hurd

src/ifaddrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub struct InterfaceAddress {
3333
}
3434

3535
cfg_if! {
36-
if #[cfg(any(linux_android, target_os = "emscripten", target_os = "fuchsia"))] {
36+
if #[cfg(any(linux_android, target_os = "emscripten", target_os = "fuchsia", target_os = "hurd"))] {
3737
fn get_ifu_from_sockaddr(info: &libc::ifaddrs) -> *const libc::sockaddr {
3838
info.ifa_ifu
3939
}

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ feature! {
134134

135135
#[cfg(any(linux_android,
136136
bsd,
137-
solarish))]
137+
solarish,
138+
target_os = "hurd"))]
138139
#[deny(missing_docs)]
139140
pub mod ifaddrs;
140141
#[cfg(not(target_os = "redox"))]

0 commit comments

Comments
 (0)