mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-26 23: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
@@ -48,7 +48,7 @@ void * dnsprchild(struct clientparam* param) {
|
||||
}
|
||||
ioctlsocket(param->clisock, FIONBIO, &ul);
|
||||
if(so._setsockopt(param->clisock, SOL_SOCKET, SO_REUSEADDR, (unsigned char *)&ul, sizeof(int))) {RETURN(820);};
|
||||
if(so._bind(param->clisock,(struct sockaddr *)¶m->sincl,sizeof(param->sincl))) {
|
||||
if(so._bind(param->clisock,(struct sockaddr *)¶m->sincl,SASIZE(¶m->sincl))) {
|
||||
RETURN(822);
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ void * dnsprchild(struct clientparam* param) {
|
||||
}
|
||||
memset(¶m->sinsl, 0, sizeof(param->sinsl));
|
||||
*SAFAMILY(¶m->sinsl) = *SAFAMILY(&nservers[0].addr);
|
||||
if(so._bind(param->remsock,(struct sockaddr *)¶m->sinsl,sizeof(param->sinsl))) {
|
||||
if(so._bind(param->remsock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl))) {
|
||||
RETURN(819);
|
||||
}
|
||||
memcpy(¶m->sinsr, &nservers[0].addr, sizeof(param->sinsr));
|
||||
|
||||
Reference in new issue
Block a user