Skip to content

Commit 4033870

Browse files
committed
simplify android
1 parent 9b22f8b commit 4033870

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

src/common.rs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -172,20 +172,15 @@ extern {
172172

173173
// These are all inline functions on android, so they end up just being entirely
174174
// missing on that platform.
175-
cfg_if! {
176-
if #[cfg(target_os = "android")] {
177-
// empty...
178-
} else {
179-
extern {
180-
pub fn abs(i: c_int) -> c_int;
181-
pub fn atof(s: *const c_char) -> c_double;
182-
pub fn labs(i: c_long) -> c_long;
183-
pub fn rand() -> c_int;
184-
pub fn srand(seed: c_uint);
185-
}
186-
}
187-
}
188175

176+
#[cfg(not(target_os = "android"))]
177+
extern {
178+
pub fn abs(i: c_int) -> c_int;
179+
pub fn atof(s: *const c_char) -> c_double;
180+
pub fn labs(i: c_long) -> c_long;
181+
pub fn rand() -> c_int;
182+
pub fn srand(seed: c_uint);
183+
}
189184

190185
cfg_if! {
191186
if #[cfg(windows)] {

0 commit comments

Comments
 (0)