X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/f906a21e807606d483995db767a7da36b1af6b31..40b538b4671a190ea35502207562edabfcea539b:/dnswin.pas diff --git a/dnswin.pas b/dnswin.pas index 19eabe4..573c888 100755 --- 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(sa,ip); populateprocvars; setlength(result,1025); getnameinforesult := getnameinfo(@sa,sizeof(tinetsockaddrv),pchar(result),length(result),nil,0,0);