fixed compilation on win$

This commit is contained in:
csoler 2021-12-20 16:10:52 +01:00
parent 4a76fddaa9
commit f6892066bc
5 changed files with 10 additions and 6 deletions

View File

@ -295,6 +295,12 @@ bool RsFdBinInterface::moretoread(uint32_t /* usec */)
{
return mTotalInBufferBytes > 0;
}
bool RsFdBinInterface::moretowrite(uint32_t /* usec */)
{
return mTotalOutBufferBytes > 0 ;
}
bool RsFdBinInterface::cansend(uint32_t)
{
return isactive();

View File

@ -48,7 +48,7 @@ public:
int netstatus() override;
int isactive() override;
bool moretoread(uint32_t usec) override;
bool moretowrite(uint32_t usec) { return mTotalOutBufferBytes > 0 ; }
bool moretowrite(uint32_t usec) ;
bool cansend(uint32_t usec) override;
int close() override;

View File

@ -102,8 +102,8 @@ private:
HiddenServiceClient *m_client;
// make the object non copyable
HiddenService(const HiddenService& s) {}
HiddenService& operator=(const HiddenService& s) { return *this ; }
HiddenService(const HiddenService&) {}
HiddenService& operator=(const HiddenService&) { return *this ; }
};
}

View File

@ -159,7 +159,7 @@ static bool test_listening_port(const std::string& /*address*/,uint16_t port)
return false;
/* Initialize socket structure */
bzero((char *) &serv_addr, sizeof(serv_addr));
memset((char *) &serv_addr, 0,sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = INADDR_ANY;
@ -174,7 +174,6 @@ static bool test_listening_port(const std::string& /*address*/,uint16_t port)
unix_fcntl_nonblock(sockfd);
int res = listen(sockfd,5);
int err = errno;
close(sockfd);
if(!res)

View File

@ -31,7 +31,6 @@
*/
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>