trying to fix compilation on windows

This commit is contained in:
csoler 2021-08-28 21:46:02 +02:00
parent f5f608dbec
commit 5e851b4efd

View File

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