Index: third_party/tcmalloc/chromium/src/maybe_threads.cc |
diff --git a/third_party/tcmalloc/chromium/src/maybe_threads.cc b/third_party/tcmalloc/chromium/src/maybe_threads.cc |
index 15c8a23dcb3509549ef6b45531f2418e988a3cf5..80a07402e908d52383665ebb9d4279246d1eb320 100644 |
--- a/third_party/tcmalloc/chromium/src/maybe_threads.cc |
+++ b/third_party/tcmalloc/chromium/src/maybe_threads.cc |
@@ -120,7 +120,10 @@ int perftools_pthread_once(pthread_once_t *ctl, |
pthread_once_ran_before_threads = true; |
return 0; |
} |
-#endif |
+#elif defined(__ANDROID__) |
+ // Android >= 2.3 (GB) always implement pthread_once. |
+ return pthread_once(ctl, init_routine); |
+#else |
if (pthread_once) { |
return pthread_once(ctl, init_routine); |
} else { |
@@ -130,4 +133,5 @@ int perftools_pthread_once(pthread_once_t *ctl, |
} |
return 0; |
} |
+#endif |
} |