mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 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
@@ -444,7 +444,7 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
#endif
|
||||
}
|
||||
size = sizeof(srv.intsa);
|
||||
for(sleeptime = SLEEPTIME * 100; so._bind(sock, (struct sockaddr*)&srv.intsa, size)==-1; usleep(sleeptime)) {
|
||||
for(sleeptime = SLEEPTIME * 100; so._bind(sock, (struct sockaddr*)&srv.intsa, SASIZE(&srv.intsa))==-1; usleep(sleeptime)) {
|
||||
sprintf((char *)buf, "bind(): %s", strerror(errno));
|
||||
if(!srv.silent)(*srv.logfunc)(&defparam, buf);
|
||||
sleeptime = (sleeptime<<1);
|
||||
@@ -481,7 +481,7 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
so._setsockopt(srv.cbsock, SOL_SOCKET, SO_REUSEPORT, (unsigned char *)&opt, sizeof(int));
|
||||
#endif
|
||||
|
||||
if(so._bind(srv.cbsock, (struct sockaddr*)&cbsa, sizeof(cbsa))==-1) {
|
||||
if(so._bind(srv.cbsock, (struct sockaddr*)&cbsa, SASIZE(&cbsa))==-1) {
|
||||
(*srv.logfunc)(&defparam, "Failed to bind connect back socket");
|
||||
return -7;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user