diff options
Diffstat (limited to 'src/lib_io.c')
-rw-r--r-- | src/lib_io.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib_io.c b/src/lib_io.c index c7d1bb31..c889a6b0 100644 --- a/src/lib_io.c +++ b/src/lib_io.c | |||
@@ -304,6 +304,14 @@ LJLIB_CF(io_method_flush) LJLIB_REC(io_flush 0) | |||
304 | return luaL_fileresult(L, fflush(io_tofile(L)->fp) == 0, NULL); | 304 | return luaL_fileresult(L, fflush(io_tofile(L)->fp) == 0, NULL); |
305 | } | 305 | } |
306 | 306 | ||
307 | #if LJ_32 && defined(__ANDROID__) && __ANDROID_API__ < 24 | ||
308 | /* The Android NDK is such an unmatched marvel of engineering. */ | ||
309 | extern int fseeko32(FILE *, long int, int) __asm__("fseeko"); | ||
310 | extern long int ftello32(FILE *) __asm__("ftello"); | ||
311 | #define fseeko(fp, pos, whence) (fseeko32((fp), (pos), (whence))) | ||
312 | #define ftello(fp) (ftello32((fp))) | ||
313 | #endif | ||
314 | |||
307 | LJLIB_CF(io_method_seek) | 315 | LJLIB_CF(io_method_seek) |
308 | { | 316 | { |
309 | FILE *fp = io_tofile(L)->fp; | 317 | FILE *fp = io_tofile(L)->fp; |