diff options
| author | Tobias Schaffner <tschaff@genua.de> | 2017-08-18 11:50:20 +0200 |
|---|---|---|
| committer | Tobias Schaffner <tschaff@genua.de> | 2017-09-08 14:36:56 +0200 |
| commit | 9bbc6dbde3e3807362680a355098102bb38a67fe (patch) | |
| tree | 2c154e9288f0929d11a134dbd403ec4ac28fa1ca /src/libstd/sys/unix/os.rs | |
| parent | 2cf0a4ad4690c587d755dc6e5383779dddb9b178 (diff) | |
| download | rust-9bbc6dbde3e3807362680a355098102bb38a67fe.tar.gz rust-9bbc6dbde3e3807362680a355098102bb38a67fe.zip | |
Add modifications needed for L4re in libstd
This commit adds the needed modifications to compile the std crate for the L4 Runtime environment (L4Re). A target for the L4Re was introduced in commit: c151220a84e40b65e45308cc0f3bbea4466d3acf In many aspects implementations for linux also apply for the L4Re microkernel. Two uncommon characteristics had to be resolved: * L4Re has no network funktionality * L4Re has a maximum stacksize of 1Mb for threads Co-authored-by: Sebastian Humenda <sebastian.humenda@tu-dresden.de>
Diffstat (limited to 'src/libstd/sys/unix/os.rs')
| -rw-r--r-- | src/libstd/sys/unix/os.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs index 8e41fd009be..5ef98d24710 100644 --- a/src/libstd/sys/unix/os.rs +++ b/src/libstd/sys/unix/os.rs @@ -38,7 +38,10 @@ static ENV_LOCK: Mutex = Mutex::new(); extern { #[cfg(not(target_os = "dragonfly"))] - #[cfg_attr(any(target_os = "linux", target_os = "emscripten", target_os = "fuchsia"), + #[cfg_attr(any(target_os = "linux", + target_os = "emscripten", + target_os = "fuchsia", + target_os = "l4re"), link_name = "__errno_location")] #[cfg_attr(any(target_os = "bitrig", target_os = "netbsd", @@ -346,10 +349,10 @@ pub fn current_exe() -> io::Result<PathBuf> { } } -#[cfg(target_os = "fuchsia")] +#[cfg(any(target_os = "fuchsia", target_os = "l4re"))] pub fn current_exe() -> io::Result<PathBuf> { use io::ErrorKind; - Err(io::Error::new(ErrorKind::Other, "Not yet implemented on fuchsia")) + Err(io::Error::new(ErrorKind::Other, "Not yet implemented!")) } pub struct Env { |
