diff --git a/navbar.md b/navbar.md
new file mode 100644
index 00000000000..6b5a8e76175
--- /dev/null
+++ b/navbar.md
@@ -0,0 +1,11 @@
+# TensorFlow
+
+* [Home][home]
+* [Getting Started](/tensorflow/g3doc/get_started/index.md)
+* [Mechanics](/tensorflow/g3doc/how_tos/index.md)
+* [Tutorials](/tensorflow/g3doc/tutorials/index.md)
+* [Python API](/tensorflow/g3doc/api_docs/python/index.md)
+* [C++ API](/tensorflow/g3doc/api_docs/cc/index.md)
+* [Other Resources](/tensorflow/g3doc/resources/index.md)
+
+[home]: /tensorflow/g3doc/index.md
diff --git a/tensorflow/core/platform/posix/port.cc b/tensorflow/core/platform/posix/port.cc
index b4a1570ef9f..1fb168ef5da 100644
--- a/tensorflow/core/platform/posix/port.cc
+++ b/tensorflow/core/platform/posix/port.cc
@@ -9,6 +9,9 @@
 #ifdef SNAPPY
 #include <snappy.h>
 #endif
+#if defined(__APPLE__) && defined(__MACH__)
+#include <thread>
+#endif
 
 namespace tensorflow {
 namespace port {
@@ -29,6 +32,9 @@ int NumSchedulableCPUs() {
     return CPU_COUNT(&cpuset);
   }
   perror("sched_getaffinity");
+#endif
+#if defined(__APPLE__) && defined(__MACH__)
+  return std::thread::hardware_concurrency();
 #endif
   const int kDefaultCores = 4;  // Semi-conservative guess
   fprintf(stderr, "can't determine number of CPU cores: assuming %d\n",
diff --git a/tensorflow/g3doc/navbar.md b/tensorflow/g3doc/navbar.md
deleted file mode 100644
index 1512af066bf..00000000000
--- a/tensorflow/g3doc/navbar.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# TensorFlow
-
-* [Home][home]
-* [Getting Started](/get_started/index.md)
-* [Mechanics](/how_tos/index.md)
-* [Tutorials](/tutorials/index.md)
-* [Python API](/api_docs/python/index.md)
-* [C++ API](/api_docs/cc/index.md)
-* [Other Resources](/resources/index.md)
-
-[home]: /index.md