summaryrefslogtreecommitdiffhomepage
path: root/libs/luci-lib-nixio/src/address.c
diff options
context:
space:
mode:
authorManuel BACHMANN <tarnyko@tarnyko.net>2020-02-24 11:04:54 +0100
committerManuel BACHMANN <tarnyko@tarnyko.net>2020-02-24 11:04:54 +0100
commit6c0b8a40f7938c027953bd4c650a02e8aad77861 (patch)
tree41ea62e1a8f7925d8b17ace0bcc2fbc228e3388d /libs/luci-lib-nixio/src/address.c
parent562425605af51443986cb2596199564e4102ffff (diff)
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 <tarnyko@tarnyko.net>
Diffstat (limited to 'libs/luci-lib-nixio/src/address.c')
-rw-r--r--libs/luci-lib-nixio/src/address.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/luci-lib-nixio/src/address.c b/libs/luci-lib-nixio/src/address.c
index 7957e8cc1..0bf53caf8 100644
--- a/libs/luci-lib-nixio/src/address.c
+++ b/libs/luci-lib-nixio/src/address.c
@@ -544,7 +544,7 @@ static int nixio_getifaddrs(lua_State *L) {
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
#if defined(__linux__) || defined(BSD)
{"getifaddrs", nixio_getifaddrs},
#endif
@@ -554,7 +554,7 @@ static const luaL_reg R[] = {
};
/* object table */
-static const luaL_reg M[] = {
+static const luaL_Reg M[] = {
{"getsockname", nixio_sock_getsockname},
{"getpeername", nixio_sock_getpeername},
{NULL, NULL}