Merge "Fix Mac build."
diff --git a/tests/utils.h b/tests/utils.h
index 4391f41..c62da75 100644
--- a/tests/utils.h
+++ b/tests/utils.h
@@ -32,6 +32,8 @@
 
 #include "private/ScopeGuard.h"
 
+#if defined(__linux__)
+
 struct map_record {
   uintptr_t addr_start;
   uintptr_t addr_end;
@@ -95,6 +97,8 @@
 
 extern "C" pid_t gettid();
 
+#endif
+
 static inline void WaitUntilThreadSleep(std::atomic<pid_t>& tid) {
   while (tid == 0) {
     usleep(1000);