X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/055fa6bf18e0733d1bf2f97075d6bb33c76e72b5..46424de88e9de51a8151fd6ef813ff7827b1ad8c:/lsocket.pas diff --git a/lsocket.pas b/lsocket.pas index f7d40e3..af3faf8 100755 --- a/lsocket.pas +++ b/lsocket.pas @@ -177,6 +177,10 @@ end; begin result := getpeername(sock,addr,addrlen); end; + function system_getsocketname(Sock: LongInt;var Addr;var Addrlen: LongInt):LongInt; + begin + result := getsocketname(sock,addr,addrlen); + end; function system_listen(Sock: LongInt; MaxConnect: LongInt):Boolean; begin result := listen(sock,maxconnect); @@ -686,7 +690,7 @@ begin {$ifdef win32} winsock.getsockname(self.fdhandlein,psockaddr(@addr)^,i); {$else} - getsocketname(self.fdhandlein,addr,i); + system_getsocketname(self.fdhandlein,addr,i); {$endif} binip := inaddrvtobinip(addr); converttov4(binip); @@ -737,7 +741,7 @@ begin winsock.getsockname(self.fdhandlein,psockaddrin(@addr)^,i); {$else} - getsocketname(self.fdhandlein,addr,i); + system_getsocketname(self.fdhandlein,addr,i); {$endif} result := inttostr(htons(addr.InAddr.port));