Avoid "64" functions on Android < 24.

This commit is contained in:
Jay Krell 2019-07-02 19:08:43 -07:00
parent 79baebe50e
commit 898c339649
1 changed files with 2 additions and 1 deletions

View File

@ -14,8 +14,9 @@
#define _CRT_SECURE_NO_WARNINGS
#endif
#if defined(__APPLE__) || defined(IOAPI_NO_64)
#if defined(__APPLE__) || defined(IOAPI_NO_64) || (__ANDROID_API__ && __ANDROID_API__ < 24)
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
// Android gained these functions in version 24.
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
#define FTELLO_FUNC(stream) ftello(stream)
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)