File lsyncd-lua.patch of Package lsyncd

diff -Nur lsyncd-release-2.2.3/cmake/FindLua.cmake new/cmake/FindLua.cmake
--- lsyncd-release-2.2.3/cmake/FindLua.cmake	2018-03-09 13:39:11.000000000 +0100
+++ new/cmake/FindLua.cmake	2021-03-07 07:39:03.333619129 +0100
@@ -36,14 +36,14 @@
 #SET(_POSSIBLE_LUA_LIBRARY lua)
 
 # Determine possible naming suffixes (there is no standard for this)
-SET(_POSSIBLE_SUFFIXES "52" "5.2" "-5.2" "53" "5.3" "-5.3" "")
+SET(_POSSIBLE_SUFFIXES "52" "5.2" "-5.2" "53" "5.3" "-5.3" "54" "5.4" "-5.4" "")
 
 # Set up possible search names and locations
-FOREACH(_SUFFIX ${_POSSIBLE_SUFFIXES})
+FOREACH(_SUFFIX IN LISTS _POSSIBLE_SUFFIXES)
   LIST(APPEND _POSSIBLE_LUA_INCLUDE "include/lua${_SUFFIX}")
   LIST(APPEND _POSSIBLE_LUA_EXECUTABLE "lua${_SUFFIX}")
   LIST(APPEND _POSSIBLE_LUA_COMPILER "luac${_SUFFIX}")
-  LIST(APPEND _POSSIBLE_LUA_LIBRARY "lua${_SUFFIX}")
+  LIST(APPEND _POSSIBLE_LUA_LIBRARY "liblua.so.${_SUFFIX}")
 ENDFOREACH(_SUFFIX)
 
 # Find the lua executable
diff -Nur lsyncd-release-2.2.3/lsyncd.c new/lsyncd.c
--- lsyncd-release-2.2.3/lsyncd.c	2018-03-09 13:39:11.000000000 +0100
+++ new/lsyncd.c	2021-03-07 07:18:09.085235425 +0100
@@ -1137,13 +1137,13 @@
 		{
 			int tlen;
 			int it;
-			lua_checkstack( L, lua_gettop( L ) + lua_objlen( L, i ) + 1 );
+			lua_checkstack( L, lua_gettop( L ) + lua_rawlen( L, i ) + 1 );
 
 			// moves table to top of stack
 			lua_pushvalue( L, i );
 			lua_remove( L, i );
 			argc--;
-			tlen = lua_objlen( L, -1 );
+			tlen = lua_rawlen( L, -1 );
 
 			for( it = 1; it <= tlen; it++ )
 			{
openSUSE Build Service is sponsored by