Fix OS X compilation
authorSean Cannella <seanc@fb.com>
Fri, 7 Feb 2014 14:25:43 +0000 (06:25 -0800)
committerSara Golemon <sgolemon@fb.com>
Fri, 7 Feb 2014 18:20:25 +0000 (10:20 -0800)
Summary: Fix OS X compilation

Test Plan: compiled on OS X

Reviewed By: delong.j@fb.com

FB internal diff: D1163199

folly/json.cpp

index 28fe5f11e992806f3949d6b42a32d26c66894b74..3141d1b2006bce870858a5723468707fbf8008e9 100644 (file)
@@ -127,7 +127,7 @@ struct Printer {
     switch (v.type()) {
     case dynamic::DOUBLE:
       if (!opts_.allow_nan_inf &&
-          (isnan(v.asDouble()) || isinf(v.asDouble()))) {
+          (std::isnan(v.asDouble()) || std::isinf(v.asDouble()))) {
         throw std::runtime_error("folly::toJson: JSON object value was a "
           "NaN or INF");
       }