about summary refs log tree commit diff
path: root/src/libstd/sys_common
diff options
context:
space:
mode:
authorSebastian Humenda <shumenda@gmx.de>2017-09-06 16:01:51 +0200
committerTobias Schaffner <tschaff@genua.de>2017-09-08 14:36:56 +0200
commit0b77464d2234231e13d03acd1d580ab2e3369d64 (patch)
tree399c4bdf00a5a385daf68e159373d154874d2c36 /src/libstd/sys_common
parent9bbc6dbde3e3807362680a355098102bb38a67fe (diff)
downloadrust-0b77464d2234231e13d03acd1d580ab2e3369d64.tar.gz
rust-0b77464d2234231e13d03acd1d580ab2e3369d64.zip
Re-enable networking module fo rL4Re
As suggested in the discussion of PR #43972, std should provide a uniform API to
all platforms. Since there's no networking on L4Re, this now is a module in
`sys::net` providing types and functions/methods returning an error for each
action.
Diffstat (limited to 'src/libstd/sys_common')
-rw-r--r--src/libstd/sys_common/mod.rs2
-rw-r--r--src/libstd/sys_common/net.rs8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/sys_common/mod.rs b/src/libstd/sys_common/mod.rs
index ae8d280d576..97058372e4c 100644
--- a/src/libstd/sys_common/mod.rs
+++ b/src/libstd/sys_common/mod.rs
@@ -44,7 +44,7 @@ pub mod thread_local;
 pub mod util;
 pub mod wtf8;
 
-#[cfg(target_os = "redox")]
+#[cfg(any(target_os = "redox", target_os = "l4re"))]
 pub use sys::net;
 
 #[cfg(not(any(target_os = "redox", target_os = "l4re")))]
diff --git a/src/libstd/sys_common/net.rs b/src/libstd/sys_common/net.rs
index 1ca39ff9d4a..19dc841b9b5 100644
--- a/src/libstd/sys_common/net.rs
+++ b/src/libstd/sys_common/net.rs
@@ -24,22 +24,22 @@ use time::Duration;
 #[cfg(any(target_os = "dragonfly", target_os = "freebsd",
           target_os = "ios", target_os = "macos",
           target_os = "openbsd", target_os = "netbsd",
-          target_os = "solaris", target_os = "haiku"))]
+          target_os = "solaris", target_os = "haiku", target_os = "l4re"))]
 use sys::net::netc::IPV6_JOIN_GROUP as IPV6_ADD_MEMBERSHIP;
 #[cfg(not(any(target_os = "dragonfly", target_os = "freebsd",
               target_os = "ios", target_os = "macos",
               target_os = "openbsd", target_os = "netbsd",
-              target_os = "solaris", target_os = "haiku")))]
+              target_os = "solaris", target_os = "haiku", target_os = "l4re")))]
 use sys::net::netc::IPV6_ADD_MEMBERSHIP;
 #[cfg(any(target_os = "dragonfly", target_os = "freebsd",
           target_os = "ios", target_os = "macos",
           target_os = "openbsd", target_os = "netbsd",
-          target_os = "solaris", target_os = "haiku"))]
+          target_os = "solaris", target_os = "haiku", target_os = "l4re"))]
 use sys::net::netc::IPV6_LEAVE_GROUP as IPV6_DROP_MEMBERSHIP;
 #[cfg(not(any(target_os = "dragonfly", target_os = "freebsd",
               target_os = "ios", target_os = "macos",
               target_os = "openbsd", target_os = "netbsd",
-              target_os = "solaris", target_os = "haiku")))]
+              target_os = "solaris", target_os = "haiku", target_os = "l4re")))]
 use sys::net::netc::IPV6_DROP_MEMBERSHIP;
 
 #[cfg(any(target_os = "linux", target_os = "android",