mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-31 18:36:24 -05:00
attempt to fix compilation on windows
This commit is contained in:
parent
6048a9a011
commit
37d4e4f3df
@ -61,14 +61,7 @@ bool RsTcpSocket::connect()
|
|||||||
}
|
}
|
||||||
mState = CONNECTED;
|
mState = CONNECTED;
|
||||||
|
|
||||||
#ifndef WINDOWS_SYS
|
unix_fcntl_nonblock(CreateSocket);
|
||||||
int flags = fcntl(CreateSocket,F_GETFL);
|
|
||||||
fcntl(CreateSocket, F_SETFL, flags | O_NONBLOCK);
|
|
||||||
#else
|
|
||||||
unsigned long int on = 1;
|
|
||||||
ret = ioctlsocket(fd, FIONBIO, &on);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
setSocket(CreateSocket);
|
setSocket(CreateSocket);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -175,14 +175,7 @@ static bool test_listening_port(const std::string& /*address*/,uint16_t port)
|
|||||||
close(sockfd);
|
close(sockfd);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifndef WINDOWS_SYS
|
unix_fcntl_nonblock(sockfd);
|
||||||
int flags = fcntl(sockfd, F_GETFL);
|
|
||||||
fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
|
|
||||||
#else
|
|
||||||
unsigned long int on = 1;
|
|
||||||
ret = ioctlsocket(fd, FIONBIO, &on);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int res = listen(sockfd,5);
|
int res = listen(sockfd,5);
|
||||||
|
|
||||||
int err = errno;
|
int err = errno;
|
||||||
|
@ -272,14 +272,9 @@ void TorProcess::start()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int flags ;
|
int flags ;
|
||||||
#ifndef WINDOWS_SYS
|
unix_fcntl_nonblock(fd[STDOUT_FILENO]);
|
||||||
flags = fcntl(fd[STDOUT_FILENO], F_GETFL); fcntl(fd[STDOUT_FILENO], F_SETFL, flags | O_NONBLOCK);
|
unix_fcntl_nonblock(fd[STDERR_FILENO]);
|
||||||
flags = fcntl(fd[STDERR_FILENO], F_GETFL); fcntl(fd[STDERR_FILENO], F_SETFL, flags | O_NONBLOCK);
|
|
||||||
#else
|
|
||||||
unsigned long int on = 1;
|
|
||||||
ret = ioctlsocket(fd[STDOUT_FILENO], FIONBIO, &on);
|
|
||||||
ret = ioctlsocket(fd[STDERR_FILENO], FIONBIO, &on);
|
|
||||||
#endif
|
|
||||||
mStdOutFD = new RsFdBinInterface(fd[STDOUT_FILENO]);
|
mStdOutFD = new RsFdBinInterface(fd[STDOUT_FILENO]);
|
||||||
mStdErrFD = new RsFdBinInterface(fd[STDERR_FILENO]);
|
mStdErrFD = new RsFdBinInterface(fd[STDERR_FILENO]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user