Skip to content

Commit

Permalink
Merge pull request #432 from raphlinus/fuchsia
Browse files Browse the repository at this point in the history
Add support for Fuchsia
  • Loading branch information
alexcrichton authored Oct 21, 2016
2 parents 80e83e6 + 8c06e14 commit c95defc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down
7 changes: 5 additions & 2 deletions src/unix/notbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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")] {
Expand Down

0 comments on commit c95defc

Please sign in to comment.