Add /usr/local/lib/lua/5.1 to default LUA_CPATH.

It is the default cpath used by LuaRocks.
This commit is contained in:
Alexey Kopytov
2017-10-25 14:51:59 +03:00
parent 1d37b3a8b3
commit 4bbccaac3c

View File

@ -612,6 +612,9 @@ static void sb_lua_set_paths(lua_State *L)
lua_pushstring(L, home);
lua_pushliteral(L, "/.luarocks/lib/lua/?" DLEXT ";");
}
lua_pushliteral(L, "/usr/local/lib/lua/5.1/?" DLEXT ";");
lua_pushliteral(L, LIBDIR ";");
lua_concat(L, lua_gettop(L) - top);