about summary refs log tree commit diff
path: root/src/libstd/sys/unix/c.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-02-11 15:25:40 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-02-11 15:25:40 -0800
commita1056360ec85192a409c01ae53ba5703e3942eb8 (patch)
treef9e2887261936dcaf8fa0cd32b66aa8d1e1c5635 /src/libstd/sys/unix/c.rs
parent315730fb273c4d55c4c25d4fba2b68dcd6a54093 (diff)
parent395709ca6d39ba1e095e404e1d2a169d918b7f0c (diff)
downloadrust-a1056360ec85192a409c01ae53ba5703e3942eb8.tar.gz
rust-a1056360ec85192a409c01ae53ba5703e3942eb8.zip
rollup merge of #22015: alexcrichton/netv2
This commit is an implementation of [RFC 807][rfc] which adds a `std::net`
module for basic neworking based on top of `std::io`. This module serves as a
replacement for the `std::old_io::net` module and networking primitives in
`old_io`.

[rfc]: fillmein

The major focus of this redesign is to cut back on the level of abstraction to
the point that each of the networking types is just a bare socket. To this end
functionality such as timeouts and cloning has been removed (although cloning
can be done through `duplicate`, it may just yield an error).

With this `net` module comes a new implementation of `SocketAddr` and `IpAddr`.
This work is entirely based on #20785 and the only changes were to alter the
in-memory representation to match the `libc`-expected variants and to move from
public fields to accessors.
Diffstat (limited to 'src/libstd/sys/unix/c.rs')
-rw-r--r--src/libstd/sys/unix/c.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstd/sys/unix/c.rs b/src/libstd/sys/unix/c.rs
index cd246e8add5..345808189a0 100644
--- a/src/libstd/sys/unix/c.rs
+++ b/src/libstd/sys/unix/c.rs
@@ -157,6 +157,7 @@ extern {
 
     pub fn utimes(filename: *const libc::c_char,
                   times: *const libc::timeval) -> libc::c_int;
+    pub fn gai_strerror(errcode: libc::c_int) -> *const libc::c_char;
 }
 
 #[cfg(any(target_os = "macos", target_os = "ios"))]