From 6c0b8a40f7938c027953bd4c650a02e8aad77861 Mon Sep 17 00:00:00 2001 From: Manuel BACHMANN Date: Mon, 24 Feb 2020 11:04:54 +0100 Subject: luci-lib-nixio: allow building with Lua5.2/LuaJIT Lua 5.1 defines a "luaL_Reg" alias for deprecated "luaL_reg", but Lua >= 5.2 and LuaJIT do not. Replace by "luaL_Reg", and define a "luaL_reg" alias in case we build with old Lua 5.0. Signed-off-by: Manuel BACHMANN --- libs/luci-lib-nixio/src/sockopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/luci-lib-nixio/src/sockopt.c') diff --git a/libs/luci-lib-nixio/src/sockopt.c b/libs/luci-lib-nixio/src/sockopt.c index cede884ce4..7b6f0488b6 100644 --- a/libs/luci-lib-nixio/src/sockopt.c +++ b/libs/luci-lib-nixio/src/sockopt.c @@ -366,7 +366,7 @@ static int nixio_sock_setsockopt(lua_State *L) { } /* module table */ -static const luaL_reg M[] = { +static const luaL_Reg M[] = { {"setblocking", nixio_sock_setblocking}, {"getsockopt", nixio_sock_getsockopt}, {"setsockopt", nixio_sock_setsockopt}, -- cgit v1.2.3