diff options
| author | Sébastien Marie <semarie@users.noreply.github.com> | 2015-02-05 18:56:10 +0100 |
|---|---|---|
| committer | Sébastien Marie <semarie@users.noreply.github.com> | 2015-02-05 19:04:30 +0100 |
| commit | cb4965ef3a826af8150ef863e98709b4ffa83767 (patch) | |
| tree | b0d9c7e279dfc3913f42786c5ceb6e00b4f4ffc4 /src/libstd/sys | |
| parent | 5ad3488f29bbccfcee074bb0f3971acec97cfc45 (diff) | |
| download | rust-cb4965ef3a826af8150ef863e98709b4ffa83767.tar.gz rust-cb4965ef3a826af8150ef863e98709b4ffa83767.zip | |
complete openbsd support for `std::env`
- add `std::env:consts` - deprecating `std::os::consts` - refactoring errno_location()
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/os.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs index be52c7dc692..b191eda583c 100644 --- a/src/libstd/sys/unix/os.rs +++ b/src/libstd/sys/unix/os.rs @@ -47,13 +47,9 @@ pub fn errno() -> i32 { } #[cfg(target_os = "openbsd")] - fn errno_location() -> *const c_int { - extern { - fn __errno() -> *const c_int; - } - unsafe { - __errno() - } + unsafe fn errno_location() -> *const c_int { + extern { fn __errno() -> *const c_int; } + __errno() } #[cfg(any(target_os = "linux", target_os = "android"))] |
