From d4bbfb8453f2161fd21e6f3c00023edf43cc88fc Mon Sep 17 00:00:00 2001 From: Tom Yan Date: Sat, 21 Jul 2018 16:39:11 +0800 Subject: osdep: make use of HAVE_ANDROID --- osdep/io.h | 4 ++-- osdep/posix-spawn.h | 4 +++- osdep/strnlen.h | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'osdep') diff --git a/osdep/io.h b/osdep/io.h index e0d6284baa..7e8a267541 100644 --- a/osdep/io.h +++ b/osdep/io.h @@ -33,7 +33,7 @@ #include #endif -#ifdef __ANDROID__ +#if HAVE_ANDROID # include # include @@ -58,7 +58,7 @@ static inline int mp_fseeko(FILE* fp, off64_t offset, int whence) { } #define fseeko(f,p,w) mp_fseeko((f), (p), (w)) -#endif // __ANDROID__ +#endif // HAVE_ANDROID #ifndef O_BINARY #define O_BINARY 0 diff --git a/osdep/posix-spawn.h b/osdep/posix-spawn.h index d8bf874c98..fdba50149c 100644 --- a/osdep/posix-spawn.h +++ b/osdep/posix-spawn.h @@ -19,7 +19,9 @@ #pragma once -#ifdef __ANDROID__ +#include "config.h" + +#if HAVE_ANDROID // posix_spawn(p) does not exist at all on Android #include "osdep/android/posix-spawn.h" #else diff --git a/osdep/strnlen.h b/osdep/strnlen.h index 0a971d0ab0..e66932a89a 100644 --- a/osdep/strnlen.h +++ b/osdep/strnlen.h @@ -20,7 +20,9 @@ #ifndef MP_OSDEP_STRNLEN #define MP_OSDEP_STRNLEN -#ifdef __ANDROID__ +#include "config.h" + +#if HAVE_ANDROID // strnlen is broken on current android ndk, see https://code.google.com/p/android/issues/detail?id=74741 #include "osdep/android/strnlen.h" #define strnlen freebsd_strnlen -- cgit v1.2.3