diff -Naur a/src/luaconf.h b/src/luaconf.h
--- a/src/luaconf.h	2024-06-13 19:15:10.000000000 -0300
+++ b/src/luaconf.h	2024-10-17 12:49:27.896223751 -0300
@@ -795,7 +795,13 @@
 */
 
 
+#if defined(liolib_c) && defined(__MINGW32__)
+#include <sys/types.h>
 
+#define l_fseek(f,o,w) fseeko(f,o,w)
+#define l_ftell(f) ftello(f)
+#define l_seeknum off_t
+#endif
 
 
 #endif
