diff options
author | Mike Pall <mike> | 2020-07-02 01:23:41 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2020-07-02 01:23:41 +0200 |
commit | 18eef08fb8df11dd887b1e7e3e6f7919c6f56720 (patch) | |
tree | 041cd6dbcb0635ea1f00fbee2e2067b60867abc8 /src | |
parent | e1e3034cf613f6913285fea41bbdac1cbeb2a9a8 (diff) | |
download | luajit-18eef08fb8df11dd887b1e7e3e6f7919c6f56720.tar.gz luajit-18eef08fb8df11dd887b1e7e3e6f7919c6f56720.tar.bz2 luajit-18eef08fb8df11dd887b1e7e3e6f7919c6f56720.zip |
Android/ARM: Fix build with recent NDK.
Diffstat (limited to 'src')
-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; |