Use SASIZE() instead of sizeof() in bind() for FreeBSD compatibility

This commit is contained in:
z3APA3A committed 2016-01-22 15:59:40 +03:00
1 parent 95a07c1b46
commit 4af5f2fde7
7 files changed
+11 -11

No files matched your search

+1 -1
View File
@@ -1061,7 +1061,7 @@ unsigned long udpresolve(int af, unsigned char * name, unsigned char * value, un
*SAFAMILY(sinsl) = *SAFAMILY(&nservers[i].addr);
}
if((sock=so._socket(SASOCK(sinsl), usetcp?SOCK_STREAM:SOCK_DGRAM, usetcp?IPPROTO_TCP:IPPROTO_UDP)) == INVALID_SOCKET) break;
if(so._bind(sock,sinsl,sizeof(addr))){
if(so._bind(sock,sinsl,SASIZE(sinsl))){
so._shutdown(sock, SHUT_RDWR);
so._closesocket(sock);
break;