aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-03-28 19:56:12 +0200
committerKim Alvefur <zash@zash.se>2016-03-28 19:56:12 +0200
commitfd043915e06206bbe7da6f0004131118b7e6ab5b (patch)
tree4a881c4d79555808809c101fd21656f0bb9b410f /net
parent07b2ab8478b0a71a6e36f49f492131341e83bab5 (diff)
downloadprosody-fd043915e06206bbe7da6f0004131118b7e6ab5b.tar.gz
prosody-fd043915e06206bbe7da6f0004131118b7e6ab5b.zip
net.dns: Import unpack() in forward-compatible way (Fixes compat with Lua5.2+)
Diffstat (limited to 'net')
-rw-r--r--net/dns.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dns.lua b/net/dns.lua
index b047ec54..689020a4 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -22,8 +22,8 @@ local is_windows = (_ and windows) or os.getenv("WINDIR");
local coroutine, io, math, string, table =
coroutine, io, math, string, table;
-local ipairs, next, pairs, print, setmetatable, tostring, assert, error, unpack, select, type=
- ipairs, next, pairs, print, setmetatable, tostring, assert, error, unpack, select, type;
+local ipairs, next, pairs, print, setmetatable, tostring, assert, error, select, type, unpack=
+ ipairs, next, pairs, print, setmetatable, tostring, assert, error, select, type, table.unpack or unpack;
local ztact = { -- public domain 20080404 lua@ztact.com
get = function(parent, ...)