trime/patches/lua.patch
WhiredPlanck 2cf90f4958 build: add patch-apply in Makefile
The original way is not vert reliable, especially for developers using Windows, it may offten lead to build failure.
2025-11-27 22:02:29 +08:00

15 lines
399 B
Diff

diff --git a/lua5.4/liolib.c b/lua5.4/liolib.c
index b08397d..2815fa5 100644
--- a/lua5.4/liolib.c
+++ b/lua5.4/liolib.c
@@ -115,7 +115,8 @@ static int l_checkmode (const char *mode) {
#if !defined(l_fseek) /* { */
-#if defined(LUA_USE_POSIX) /* { */
+#if defined(LUA_USE_POSIX) && \
+ (!defined(ANDROID) || (defined(__LP64__) || ANDROID_PLATFORM >= 24)) /* { */
#include <sys/types.h>