diff options
Diffstat (limited to 'src/errno.rs')
-rw-r--r-- | src/errno.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/errno.rs b/src/errno.rs index a27abaa7..9102d7b1 100644 --- a/src/errno.rs +++ b/src/errno.rs @@ -35,12 +35,18 @@ unsafe fn errno_location() -> *mut c_int { __errno() } -#[cfg(any(target_os = "linux", target_os = "android"))] +#[cfg(target_os = "linux")] unsafe fn errno_location() -> *mut c_int { extern { fn __errno_location() -> *mut c_int; } __errno_location() } +#[cfg(target_os = "android")] +unsafe fn errno_location() -> *mut c_int { + extern { fn __errno() -> *mut c_int; } + __errno() +} + /// Sets the platform-specific errno to no-error unsafe fn clear() -> () { *errno_location() = 0; |