diff --git a/src/Platform_unix.cpp b/src/Platform_unix.cpp index ecccc49ee..c05893072 100644 --- a/src/Platform_unix.cpp +++ b/src/Platform_unix.cpp @@ -22,6 +22,7 @@ */ #include +#include #include #include #include diff --git a/src/Summary.cpp b/src/Summary.cpp index c6c533419..2d93f4293 100644 --- a/src/Summary.cpp +++ b/src/Summary.cpp @@ -23,6 +23,7 @@ #include +#include #include diff --git a/src/api/ApiState.cpp b/src/api/ApiState.cpp index bade355a3..0ccb34fe6 100644 --- a/src/api/ApiState.cpp +++ b/src/api/ApiState.cpp @@ -21,7 +21,7 @@ * along with this program. If not, see . */ -#include +#include #include #include @@ -53,7 +53,7 @@ extern "C" static inline double normalize(double d) { - if (!std::isnormal(d)) { + if (!isnormal(d)) { return 0.0; } diff --git a/src/api/NetworkState.cpp b/src/api/NetworkState.cpp index 997f52dfc..bae290d04 100644 --- a/src/api/NetworkState.cpp +++ b/src/api/NetworkState.cpp @@ -23,6 +23,7 @@ #include +#include #include #include diff --git a/src/workers/Hashrate.cpp b/src/workers/Hashrate.cpp index 5c20c247c..bd5b7df6e 100644 --- a/src/workers/Hashrate.cpp +++ b/src/workers/Hashrate.cpp @@ -23,8 +23,9 @@ #include -#include +#include #include +#include #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; } }