From cb4965ef3a826af8150ef863e98709b4ffa83767 Mon Sep 17 00:00:00 2001 From: Sébastien Marie Date: Thu, 5 Feb 2015 18:56:10 +0100 Subject: complete openbsd support for `std::env` - add `std::env:consts` - deprecating `std::os::consts` - refactoring errno_location() --- src/libstd/sys/unix/os.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/libstd/sys') 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"))] -- cgit 1.4.1-3-g733a5