#196 Fix Linux build.

This commit is contained in:
XMRig 2017-11-17 12:59:46 +03:00
parent d403dcf95c
commit 4b00eb4a9f
5 changed files with 10 additions and 6 deletions

View file

@ -23,8 +23,9 @@
#include <chrono>
#include <cmath>
#include <math.h>
#include <memory.h>
#include <stdio.h>
#include "log/Log.h"
#include "Options.h"
@ -33,7 +34,7 @@
inline const char *format(double h, char* buf, size_t size)
{
if (std::isnormal(h)) {
if (isnormal(h)) {
snprintf(buf, size, "%03.1f", h);
return buf;
}
@ -77,7 +78,7 @@ double Hashrate::calc(size_t ms) const
for (int i = 0; i < m_threads; ++i) {
data = calc(i, ms);
if (std::isnormal(data)) {
if (isnormal(data)) {
result += data;
}
}
@ -170,7 +171,7 @@ void Hashrate::stop()
void Hashrate::updateHighest()
{
double highest = calc(ShortInterval);
if (std::isnormal(highest) && highest > m_highest) {
if (isnormal(highest) && highest > m_highest) {
m_highest = highest;
}
}