diff --git a/src/units.cc b/src/units.cc index 94f3ed1..a276089 100644 --- a/src/units.cc +++ b/src/units.cc @@ -475,7 +475,7 @@ string strWithUnitLowerCase(double v, Unit u) string valueToString(double v, Unit u) { - if (isnan(v)) + if (::isnan(v)) { return "null"; } diff --git a/src/util.cc b/src/util.cc index 3f20ef0..9ccab0b 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1365,7 +1365,7 @@ string strdate(struct tm *date) string strdate(double v) { - if (isnan(v)) return "null"; + if (::isnan(v)) return "null"; struct tm date; time_t t = v; localtime_r(&t, &date); @@ -1381,7 +1381,7 @@ string strdatetime(struct tm *datetime) string strdatetime(double v) { - if (isnan(v)) return "null"; + if (::isnan(v)) return "null"; struct tm datetime; time_t t = v; localtime_r(&t, &datetime);