From 40b538b4671a190ea35502207562edabfcea539b Mon Sep 17 00:00:00 2001 From: plugwash Date: Mon, 13 Apr 2009 00:12:13 +0000 Subject: [PATCH 1/1] make dnswin use makeaddrinfov git-svn-id: file:///svnroot/lcore/trunk@45 b1de8a11-f9be-4011-bde0-cc7ace90066a --- dnswin.pas | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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); -- 2.30.2