mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Android/ARM: Fix build with recent NDK.
This commit is contained in:
parent
e1e3034cf6
commit
18eef08fb8
@ -304,6 +304,14 @@ LJLIB_CF(io_method_flush) LJLIB_REC(io_flush 0)
|
|||||||
return luaL_fileresult(L, fflush(io_tofile(L)->fp) == 0, NULL);
|
return luaL_fileresult(L, fflush(io_tofile(L)->fp) == 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LJ_32 && defined(__ANDROID__) && __ANDROID_API__ < 24
|
||||||
|
/* The Android NDK is such an unmatched marvel of engineering. */
|
||||||
|
extern int fseeko32(FILE *, long int, int) __asm__("fseeko");
|
||||||
|
extern long int ftello32(FILE *) __asm__("ftello");
|
||||||
|
#define fseeko(fp, pos, whence) (fseeko32((fp), (pos), (whence)))
|
||||||
|
#define ftello(fp) (ftello32((fp)))
|
||||||
|
#endif
|
||||||
|
|
||||||
LJLIB_CF(io_method_seek)
|
LJLIB_CF(io_method_seek)
|
||||||
{
|
{
|
||||||
FILE *fp = io_tofile(L)->fp;
|
FILE *fp = io_tofile(L)->fp;
|
||||||
|
Loading…
Reference in New Issue
Block a user