diff --git a/src/unix/mod.rs b/src/unix/mod.rs index e31920d5..3e03eea6 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -228,6 +228,10 @@ cfg_if! { #[link(name = "root")] #[link(name = "network")] extern {} + } else if #[cfg(target_os = "fuchsia")] { + #[link(name = "c")] + #[link(name = "mxio")] + extern {} } else { #[link(name = "c")] #[link(name = "m")] @@ -843,7 +847,8 @@ extern { cfg_if! { if #[cfg(any(target_os = "linux", target_os = "android", - target_os = "emscripten"))] { + target_os = "emscripten", + target_os = "fuchsia"))] { mod notbsd; pub use self::notbsd::*; } else if #[cfg(any(target_os = "macos", diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index ea820ea5..f1cccad6 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -728,6 +728,7 @@ extern { cfg_if! { if #[cfg(any(target_env = "musl", + target_os = "fuchsia", target_os = "emscripten"))] { mod musl; pub use self::musl::*; diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index 343c3126..d11202b7 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -53,7 +53,9 @@ s! { pub ai_protocol: ::c_int, pub ai_addrlen: socklen_t, - #[cfg(any(target_os = "linux", target_os = "emscripten"))] + #[cfg(any(target_os = "linux", + target_os = "emscripten", + target_os = "fuchsia"))] pub ai_addr: *mut ::sockaddr, pub ai_canonname: *mut c_char, @@ -858,7 +860,8 @@ extern { cfg_if! { if #[cfg(any(target_os = "linux", - target_os = "emscripten"))] { + target_os = "emscripten", + target_os = "fuchsia"))] { mod linux; pub use self::linux::*; } else if #[cfg(target_os = "android")] {