From 144f9c440994c735a6b68e4233d1a1783b17d0bd Mon Sep 17 00:00:00 2001 From: SChernykh Date: Wed, 14 Oct 2020 21:03:21 +0200 Subject: [PATCH] Fixed compile errors in Linux --- src/backend/common/Workers.cpp | 2 +- src/base/net/stratum/Pool.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/backend/common/Workers.cpp b/src/backend/common/Workers.cpp index 6a4cf0cad..ae09f15bb 100644 --- a/src/backend/common/Workers.cpp +++ b/src/backend/common/Workers.cpp @@ -156,7 +156,7 @@ static void getHashrateData(xmrig::IWorker* worker, uint64_t& hashCount, uint64_ template<> -static void getHashrateData(xmrig::IWorker* worker, uint64_t& hashCount, uint64_t&) +void getHashrateData(xmrig::IWorker* worker, uint64_t& hashCount, uint64_t&) { hashCount = worker->rawHashes(); } diff --git a/src/base/net/stratum/Pool.cpp b/src/base/net/stratum/Pool.cpp index ba7b12bf4..b09559c2a 100644 --- a/src/base/net/stratum/Pool.cpp +++ b/src/base/net/stratum/Pool.cpp @@ -53,6 +53,11 @@ #include "base/net/stratum/NullClient.h" +#ifdef _MSC_VER +# define strcasecmp _stricmp +#endif + + namespace xmrig { @@ -131,10 +136,10 @@ xmrig::Pool::Pool(const rapidjson::Value &object) : const char* benchSize = Json::getString(object, kBenchmark, nullptr); if (benchSize) { - if (stricmp(benchSize, "1M") == 0) { + if (strcasecmp(benchSize, "1M") == 0) { m_benchSize = 1000000; } - else if (stricmp(benchSize, "10M") == 0) { + else if (strcasecmp(benchSize, "10M") == 0) { m_benchSize = 10000000; } }