aports/main/lua-filesystem/lua5.5.patch
2025-12-23 15:05:58 +01:00

23 lines
749 B
Diff

From c908614ce7402acdd7a765b1675e0c250d368acf Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Fri, 1 Aug 2025 18:21:00 +0200
Subject: [PATCH] Support Lua 5.5
---
src/lfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lfs.c b/src/lfs.c
index b51470c..07831aa 100644
--- a/src/lfs.c
+++ b/src/lfs.c
@@ -311,7 +311,7 @@ static FILE *check_file(lua_State * L, int idx, const char *funcname)
return 0;
} else
return *fh;
-#elif LUA_VERSION_NUM >= 502 && LUA_VERSION_NUM <= 504
+#elif LUA_VERSION_NUM >= 502 && LUA_VERSION_NUM <= 505
luaL_Stream *fh = (luaL_Stream *) luaL_checkudata(L, idx, "FILE*");
if (fh->closef == 0 || fh->f == NULL) {
luaL_error(L, "%s: closed file", funcname);