This patch goes on top of the previous one (http://forum.simutrans.com/index.php?topic=9311.0) and fixes a problem with the use of getnameinfo (the salength parameter needs to differ for AF_INET/AF_INET6 address families). I've also tidied up some of the error reporting as well.
(Without this patch IPv6 is broken on at least Debian linux)
thanks!