--- lmpack.c | 4 ++++ 1 file changed, 4 insertions(+) Index: libmpack-lua-1.0.12/lmpack.c =================================================================== --- libmpack-lua-1.0.12.orig/lmpack.c 2024-02-07 00:28:09.000000000 +0100 +++ libmpack-lua-1.0.12/lmpack.c 2025-10-13 15:00:35.793539104 +0200 @@ -54,6 +54,10 @@ #define luaL_reg luaL_Reg #endif +#if LUA_VERSION_NUM < 502 +# define luaL_reg luaL_Reg +#endif + #if LUA_VERSION_NUM > 501 #ifndef luaL_register #define luaL_register(L,n,f) luaL_setfuncs(L,f,0)