mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-09 00:15:48 -07:00
Fixes an issue on macOS Mojave that was patched in fa1c281e79.
The list of changes can be found under
build/premake/premake5/CHANGES.txt.
This was SVN commit r22021.
15 lines
394 B
Lua
15 lines
394 B
Lua
local socket = require "socket"
|
|
local addresses = assert(socket.dns.getaddrinfo("localhost"))
|
|
assert(type(addresses) == 'table')
|
|
|
|
local ipv4mask = "^%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?$"
|
|
|
|
for i, alt in ipairs(addresses) do
|
|
if alt.family == 'inet' then
|
|
assert(type(alt.addr) == 'string')
|
|
assert(alt.addr:find(ipv4mask))
|
|
assert(alt.addr == '127.0.0.1')
|
|
end
|
|
end
|
|
|
|
print("done!")
|