summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-01-10 17:27:43 +0100
committerMattes D <github@xoft.cz>2014-01-10 17:27:43 +0100
commite213769216c2cf3ccdb5bc82a07cd0be735e8d04 (patch)
tree32767887bcfeeb7c39b398d191c9afe27c142d3e
parentFixed generator adding values to ini file. (diff)
parentUsing dlopen() on all platforms except WIN32. (diff)
downloadcuberite-e213769216c2cf3ccdb5bc82a07cd0be735e8d04.tar
cuberite-e213769216c2cf3ccdb5bc82a07cd0be735e8d04.tar.gz
cuberite-e213769216c2cf3ccdb5bc82a07cd0be735e8d04.tar.bz2
cuberite-e213769216c2cf3ccdb5bc82a07cd0be735e8d04.tar.lz
cuberite-e213769216c2cf3ccdb5bc82a07cd0be735e8d04.tar.xz
cuberite-e213769216c2cf3ccdb5bc82a07cd0be735e8d04.tar.zst
cuberite-e213769216c2cf3ccdb5bc82a07cd0be735e8d04.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua2
-rw-r--r--lib/lua/CMakeLists.txt5
2 files changed, 6 insertions, 1 deletions
diff --git a/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua b/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua
index 6e90b1ae9..4a7cd4e1e 100644
--- a/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua
+++ b/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua
@@ -27,7 +27,7 @@ LOG("headers: ");
for k, v in pairs(headers or {}) do
LOG(" " .. k .. ": " .. v);
end
-LOG("body length: " .. string.length(body));
+LOG("body length: " .. string.len(body));
diff --git a/lib/lua/CMakeLists.txt b/lib/lua/CMakeLists.txt
index b4b5b5f1d..af03f4b1a 100644
--- a/lib/lua/CMakeLists.txt
+++ b/lib/lua/CMakeLists.txt
@@ -25,6 +25,11 @@ else()
add_library(lua ${SOURCE})
endif()
+# Tell Lua what dynamic loader to use (for LuaRocks):
+if (UNIX)
+ add_definitions(-DLUA_USE_DLOPEN)
+endif()
+
if (UNIX)
target_link_libraries(lua m ${DYNAMIC_LOADER})
endif()