Add an exception for building on OSX.
authorMichael Lee <mzlee@fb.com>
Thu, 2 Jul 2015 14:49:15 +0000 (07:49 -0700)
committerSara Golemon <sgolemon@fb.com>
Thu, 2 Jul 2015 18:03:14 +0000 (11:03 -0700)
Summary: The Homebrew setup fails to compile on OSX.

Reviewed By: @paulbiss

Differential Revision: D2212084

folly/String.cpp

index 5ae7ee164c57e0b8dfc9650e69f7b4b70d3f2ea3..bbf8f323a2a3003c660df5362955cd9fac220a7a 100644 (file)
@@ -342,7 +342,7 @@ fbstring errnoStr(int err) {
   } else {
     result.assign(buf);
   }
-#elif defined(HAVE_XSI_STRERROR_R)
+#elif defined(HAVE_XSI_STRERROR_R) || defined(__APPLE__) || defined(__ANDROID__)
   // Using XSI-compatible strerror_r
   int r = strerror_r(err, buf, sizeof(buf));