From f6892066bcaf37c4d952d09566e1ecbe2cf95b9e Mon Sep 17 00:00:00 2001 From: csoler Date: Mon, 20 Dec 2021 16:10:52 +0100 Subject: [PATCH] fixed compilation on win$ --- libretroshare/src/pqi/pqifdbin.cc | 6 ++++++ libretroshare/src/pqi/pqifdbin.h | 2 +- libretroshare/src/tor/HiddenService.h | 4 ++-- libretroshare/src/tor/TorManager.cpp | 3 +-- libretroshare/src/tor/TorProcess.cpp | 1 - 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libretroshare/src/pqi/pqifdbin.cc b/libretroshare/src/pqi/pqifdbin.cc index 255e65b77..b413cf87b 100644 --- a/libretroshare/src/pqi/pqifdbin.cc +++ b/libretroshare/src/pqi/pqifdbin.cc @@ -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(); diff --git a/libretroshare/src/pqi/pqifdbin.h b/libretroshare/src/pqi/pqifdbin.h index 5fa82df8e..df9af39a5 100644 --- a/libretroshare/src/pqi/pqifdbin.h +++ b/libretroshare/src/pqi/pqifdbin.h @@ -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; diff --git a/libretroshare/src/tor/HiddenService.h b/libretroshare/src/tor/HiddenService.h index 0e50e93b9..604d8083f 100644 --- a/libretroshare/src/tor/HiddenService.h +++ b/libretroshare/src/tor/HiddenService.h @@ -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 ; } }; } diff --git a/libretroshare/src/tor/TorManager.cpp b/libretroshare/src/tor/TorManager.cpp index d2baa128b..ff61acbfc 100644 --- a/libretroshare/src/tor/TorManager.cpp +++ b/libretroshare/src/tor/TorManager.cpp @@ -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) diff --git a/libretroshare/src/tor/TorProcess.cpp b/libretroshare/src/tor/TorProcess.cpp index 06ceb413f..134e542db 100644 --- a/libretroshare/src/tor/TorProcess.cpp +++ b/libretroshare/src/tor/TorProcess.cpp @@ -31,7 +31,6 @@ */ #include -#include #include #include