Skip to content

Commit c890644

Browse files
committed
__errno_location should call __errno on android
1 parent 1719b78 commit c890644

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: src/errno.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,18 @@ unsafe fn errno_location() -> *mut c_int {
3535
__errno()
3636
}
3737

38-
#[cfg(any(target_os = "linux", target_os = "android"))]
38+
#[cfg(target_os = "linux")]
3939
unsafe fn errno_location() -> *mut c_int {
4040
extern { fn __errno_location() -> *mut c_int; }
4141
__errno_location()
4242
}
4343

44+
#[cfg(target_os = "android")]
45+
unsafe fn errno_location() -> *mut c_int {
46+
extern { fn __errno() -> *mut c_int; }
47+
__errno()
48+
}
49+
4450
/// Sets the platform-specific errno to no-error
4551
unsafe fn clear() -> () {
4652
*errno_location() = 0;

0 commit comments

Comments
 (0)