Do not try to compile the monitor on windows

This commit is contained in:
dongresource 2020-12-03 00:15:06 +01:00
parent c8b011913a
commit e899928928
3 changed files with 12 additions and 0 deletions

View File

@ -6,6 +6,8 @@
#include <cstdio>
#ifndef _WIN32
static int listener;
static std::mutex sockLock; // guards socket list
static std::list<int> sockets;
@ -110,3 +112,5 @@ void Monitor::start(void *unused) {
}
}
}
#endif // _WIN32

View File

@ -1,5 +1,7 @@
#pragma once
#ifndef _WIN32
#include "CNProtocol.hpp"
#include <list>
@ -10,3 +12,5 @@ namespace Monitor {
void tick(CNServer *, time_t);
void start(void *);
};
#endif // _WIN32

View File

@ -104,7 +104,9 @@ int main() {
TransportManager::init();
BuddyManager::init();
GroupManager::init();
#ifndef _WIN32
Monitor::init();
#endif
Database::open();
switch (settings::EVENTMODE) {
@ -123,7 +125,9 @@ int main() {
shardServer = new CNShardServer(settings::SHARDPORT);
shardThread = new std::thread(startShard, (CNShardServer*)shardServer);
#ifndef _WIN32
monitorThread = new std::thread(Monitor::start, nullptr);
#endif
loginServer.start();