From 4bbccaac3c233d20f08523055abce2bbee8d912d Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Wed, 25 Oct 2017 14:51:59 +0300 Subject: [PATCH] Add /usr/local/lib/lua/5.1 to default LUA_CPATH. It is the default cpath used by LuaRocks. --- src/sb_lua.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sb_lua.c b/src/sb_lua.c index 4bfb434..12b8bc8 100644 --- a/src/sb_lua.c +++ b/src/sb_lua.c @@ -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);