Index: sys/contrib/lua/src/lauxlib.c =================================================================== --- sys/contrib/lua/src/lauxlib.c +++ sys/contrib/lua/src/lauxlib.c @@ -947,7 +947,11 @@ } +#ifdef BOOT_LUA +static int lpanic (lua_State *L) { +#else static int panic (lua_State *L) { +#endif lua_writestringerror("PANIC: unprotected error in call to Lua API (%s)\n", lua_tostring(L, -1)); return 0; /* return to Lua to abort */ @@ -956,7 +960,11 @@ LUALIB_API lua_State *luaL_newstate (void) { lua_State *L = lua_newstate(l_alloc, NULL); +#ifdef BOOT_LUA + if (L) lua_atpanic(L, &lpanic); +#endif if (L) lua_atpanic(L, &panic); +#endif return L; }