From: Wan-Teh Chang Date: Thu, 30 Nov 2023 22:27:06 +0000 (-0800) Subject: Add the needed Android API level predicates. X-Git-Tag: accepted/tizen/7.0/unified/20240521.012539~1^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3b821fd4a76d2ad3d1582ed9fa1221375b5c242;p=platform%2Fupstream%2Flibvpx.git Add the needed Android API level predicates. fseeko and ftello are available on Android only from API level 24. Add the needed guards for these functions. Suggested by Yifan Yang. Change-Id: I3a6721d31e1d961ab10b434ea6e92959bd5a70ab (cherry picked from commit bf0755418357237f6ea4794dfab3c474d06a0937) --- diff --git a/tools_common.h b/tools_common.h index 9850907..e2942d0 100644 --- a/tools_common.h +++ b/tools_common.h @@ -32,7 +32,12 @@ typedef int64_t FileOffset; #define fseeko fseeko64 #define ftello ftello64 typedef off64_t FileOffset; -#elif CONFIG_OS_SUPPORT +#elif CONFIG_OS_SUPPORT && \ + !(defined(__ANDROID__) && __ANDROID_API__ < 24 && !defined(__LP64__) && \ + defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) +/* POSIX.1 has fseeko and ftello. fseeko and ftello are not available before + * Android API level 24. See + * https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md */ #include /* NOLINT */ typedef off_t FileOffset; /* Use 32-bit file operations in WebM file format when building ARM