Merge "Allow --gtest_print_time without a value."
diff --git a/tests/SystemTests.cpp b/tests/SystemTests.cpp
index 194731c..57d7656 100644
--- a/tests/SystemTests.cpp
+++ b/tests/SystemTests.cpp
@@ -15,7 +15,9 @@
  */
 
 #include <fcntl.h>
+#if !defined(__APPLE__)
 #include <malloc.h>
+#endif
 #include <signal.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -1205,12 +1207,16 @@
 }
 
 TEST(SystemTestsMemory, DISABLED_memory) {
+#if !defined(__APPLE__)
   struct mallinfo info = mallinfo();
 #if defined(__ANDROID__)
   printf("Allocated %zu\n", info.uordblks);
 #else
   printf("Allocated %d\n", info.uordblks);
 #endif
+#else
+  printf("Allocated 0\n");
+#endif
 }
 
 }  // namespace gtest_extras