From: Jory A. Pratt getcontext is only avaliable on glibc systems diff --git a/tools/profiler/core/platform-linux-android.cpp b/tools/profiler/core/platform-linux-android.cpp --- a/tools/profiler/core/platform-linux-android.cpp +++ b/tools/profiler/core/platform-linux-android.cpp @@ -529,14 +529,16 @@ PlatformInit(PSLockRef aLock) // Context used by synchronous samples. It's safe to have a single one because // only one synchronous sample can be taken at a time (due to // profiler_get_backtrace()'s PSAutoLock). ucontext_t sSyncUContext; void Registers::SyncPopulate() { +#if defined(__GLIBC__) if (!getcontext(&sSyncUContext)) { PopulateRegsFromContext(*this, &sSyncUContext); } +#endif } #endif