# HG changeset patch # User bsw # Date 1612795510 -3600 # Node ID 96336212e94d6d7884648739674da8dd528a2039 # Parent 35e605322b416cd7f6a3f8410178b9bbafcee434 Fixed mldap for Lua 5.3 diff -r 35e605322b41 -r 96336212e94d lib/mldap/Makefile --- a/lib/mldap/Makefile Mon Feb 08 15:44:21 2021 +0100 +++ b/lib/mldap/Makefile Mon Feb 08 15:45:10 2021 +0100 @@ -2,7 +2,7 @@ ld -shared -L/usr/lib -o mldap.so mldap.o /usr/lib/libldap.so mldap.o: mldap.c - gcc -g -c -fPIC -I/usr/include -I/usr/include/lua5.1 -Wall -o mldap.o mldap.c + gcc -g -c -fPIC -I/usr/include -I/usr/include/lua5.3 -Wall -o mldap.o mldap.c clean:: rm -f mldap.so mldap.o diff -r 35e605322b41 -r 96336212e94d lib/mldap/mldap.c --- a/lib/mldap/mldap.c Mon Feb 08 15:44:21 2021 +0100 +++ b/lib/mldap/mldap.c Mon Feb 08 15:45:10 2021 +0100 @@ -340,7 +340,7 @@ lua_pop(L, 1); // removes stack element 4 filter = mldap_get_named_string_arg(L, 2, "filter", false); // pushed to 4 lua_getfield(L, 2, "attrs"); // pushed to 5 - nattrs = lua_len(L, -1); + nattrs = luaL_len(L, -1); attrs = calloc(nattrs + 1, sizeof(char *)); // memory allocation, +1 for terminating NULL if (!attrs) return luaL_error(L, "Memory allocation error in C function 'mldap_queryconn'"); for (attr_idx=0; attr_idx