Module: kamailio
Branch: master
Commit: 8ea9d5a8b989332e16ecc56373d7d417123dc20c
URL: 
https://github.com/kamailio/kamailio/commit/8ea9d5a8b989332e16ecc56373d7d417123dc20c

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2022-01-23T19:48:59+01:00

app_lua: enclose ksr_luaL_openlib() between defines

- uses functions not available in lua 5.1

---

Modified: src/modules/app_lua/app_lua_api.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/8ea9d5a8b989332e16ecc56373d7d417123dc20c.diff
Patch: 
https://github.com/kamailio/kamailio/commit/8ea9d5a8b989332e16ecc56373d7d417123dc20c.patch

---

diff --git a/src/modules/app_lua/app_lua_api.c 
b/src/modules/app_lua/app_lua_api.c
index 2bf255414a..0a1d13532c 100644
--- a/src/modules/app_lua/app_lua_api.c
+++ b/src/modules/app_lua/app_lua_api.c
@@ -188,6 +188,7 @@ int sr_lua_reload_module(unsigned int reload)
        return 0;
 }
 
+#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 504
 /**
  *
  */
@@ -241,6 +242,7 @@ void ksr_luaL_openlib(lua_State *L, const char *libname,
 {
        ksr_luaL_openlib_mode(L, libname, lfuncs, nup, 1);
 }
+#endif
 
 /**
  *


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to