Software /
code /
prosody
Changeset
9494:b19f676203fd
util.dependencies: Add compat code for normalization of socket constructors
Old LuaSocket had only tcp() which was IPv4-only. LuaSocket ~3.0 adds a
tcp6() that creates a IPv6 socket. Some version moves tcp() to tcp4()
and adds an IP-version-agnostic tcp() constructor.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 12 Oct 2018 16:21:16 +0200 |
parents | 9493:55b40f3fa659 |
children | 9495:89e05b118f6e |
files | util/dependencies.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/util/dependencies.lua Thu Oct 11 19:23:21 2018 +0100 +++ b/util/dependencies.lua Fri Oct 12 16:21:16 2018 +0200 @@ -77,6 +77,10 @@ ["Source"] = "http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/"; }); fatal = true; + elseif not socket.tcp4 then + -- COMPAT LuaSocket before being IP-version agnostic + socket.tcp4 = socket.tcp; + socket.udp4 = socket.udp; end local lfs, err = softreq "lfs"