diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-09-05 22:15:02 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-09-05 22:15:02 -0700 |
| commit | 807408b708a11c9a96b2dc4fedd611276273574f (patch) | |
| tree | 912b44c6f6bb8a0fb243a103743f9811912ac05e /src | |
| parent | 0948f54e65227a95d386e429f4e1356d7dd3fba7 (diff) | |
| download | rust-807408b708a11c9a96b2dc4fedd611276273574f.tar.gz rust-807408b708a11c9a96b2dc4fedd611276273574f.zip | |
std::rt: Fix addrinfo definition on BSD
Diffstat (limited to 'src')
| -rw-r--r-- | src/libstd/rt/uv/uvll.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/libstd/rt/uv/uvll.rs b/src/libstd/rt/uv/uvll.rs index 977eae0c269..08e9bc062ce 100644 --- a/src/libstd/rt/uv/uvll.rs +++ b/src/libstd/rt/uv/uvll.rs @@ -154,7 +154,8 @@ pub type sockaddr_storage = c_void; pub type socklen_t = c_int; // XXX: This is a standard C type. Could probably be defined in libc -#[cfg(unix)] +#[cfg(target_os = "android")] +#[cfg(target_os = "linux")] pub struct addrinfo { ai_flags: c_int, ai_family: c_int, @@ -166,6 +167,19 @@ pub struct addrinfo { ai_next: *addrinfo } +#[cfg(target_os = "macos")] +#[cfg(target_os = "freebsd")] +pub struct addrinfo { + ai_flags: c_int, + ai_family: c_int, + ai_socktype: c_int, + ai_protocol: c_int, + ai_addrlen: socklen_t, + ai_canonname: *char, + ai_addr: *sockaddr, + ai_next: *addrinfo +} + #[cfg(windows)] pub struct addrinfo { ai_flags: c_int, |
