mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-27 07:59:41 +08:00
Use SASIZE() instead of sizeof() in bind() for FreeBSD compatibility
This commit is contained in:
1 parent
95a07c1b46
commit
4af5f2fde7
7 files changed
+11
-11
No files matched your search
+2
-2
@@ -63,7 +63,7 @@ void * udppmchild(struct clientparam* param) {
|
||||
ioctlsocket(param->clisock, FIONBIO, &ul);
|
||||
size = sizeof(param->sinsl);
|
||||
if(so._getsockname(param->srv->srvsock, (struct sockaddr *)¶m->sinsl, &size)) {RETURN(21);};
|
||||
if(so._bind(param->clisock,(struct sockaddr *)¶m->sinsl,sizeof(struct sockaddr_in))) {
|
||||
if(so._bind(param->clisock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl))) {
|
||||
RETURN(822);
|
||||
}
|
||||
#else
|
||||
@@ -77,7 +77,7 @@ void * udppmchild(struct clientparam* param) {
|
||||
#endif
|
||||
*SAPORT(¶m->sinsl) = 0;
|
||||
if ((param->remsock=so._socket(SASOCK(¶m->sinsl), SOCK_DGRAM, IPPROTO_UDP)) == INVALID_SOCKET) {RETURN (11);}
|
||||
if(so._bind(param->remsock,(struct sockaddr *)¶m->sinsl,sizeof(param->sinsl))) {RETURN (12);}
|
||||
if(so._bind(param->remsock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl))) {RETURN (12);}
|
||||
#ifdef _WIN32
|
||||
ioctlsocket(param->remsock, FIONBIO, &ul);
|
||||
#else
|
||||
|
||||
Reference in new issue
Block a user