diff --git a/libretroshare/src/tor/TorManager.cpp b/libretroshare/src/tor/TorManager.cpp index a4bb04e4f..f825bbfc7 100644 --- a/libretroshare/src/tor/TorManager.cpp +++ b/libretroshare/src/tor/TorManager.cpp @@ -32,9 +32,10 @@ #include -#if defined(_WIN32) || defined(__MINGW32__) -#include -#else +// This works on linux only. I have no clue how to do that on windows. Anyway, this +// is only needed for an assert that should normaly never be triggered. + +#if !defined(_WIN32) && !defined(__MINGW32__) #include #endif @@ -706,7 +707,9 @@ void RsTor::setHiddenServiceDirectory(const std::string& dir) TorManager *RsTor::instance() { +#if !defined(_WIN32) && !defined(__MINGW32__) assert(getpid() == syscall(SYS_gettid));// make sure we're not in a thread +#endif static TorManager *rsTor = nullptr;