X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/85ef2ce64f0cc31a063fccea69fdcc7281d51548..055fa6bf18e0733d1bf2f97075d6bb33c76e72b5:/dnswin.pas?ds=inline diff --git a/dnswin.pas b/dnswin.pas old mode 100755 new mode 100644 index 19eabe4..e9c2a16 --- a/dnswin.pas +++ b/dnswin.pas @@ -233,17 +233,7 @@ var getnameinforesult : integer; begin - if ip.family = AF_INET then begin - sa.InAddr.family := AF_INET; - sa.InAddr.port := 1; - sa.InAddr.addr := ip.ip; - end else {$ifdef ipv6}if ip.family = AF_INET6 then begin - sa.InAddr6.sin6_family := AF_INET6; - sa.InAddr6.sin6_port := 1; - sa.InAddr6.sin6_addr := ip.ip6; - end else{$endif} begin - raise exception.create('unrecognised address family'); - end; + makeinaddrv(ip,'1',sa); populateprocvars; setlength(result,1025); getnameinforesult := getnameinfo(@sa,sizeof(tinetsockaddrv),pchar(result),length(result),nil,0,0);