diff --git a/tools/profiler/core/platform.h b/tools/profiler/core/platform.h index 8379eb0347..4246d8138c 100644 --- a/tools/profiler/core/platform.h +++ b/tools/profiler/core/platform.h @@ -39,10 +39,11 @@ #include #include -// We need a definition of gettid(), but old glibc versions don't provide a -// wrapper for it. -#if defined(__GLIBC__) +// We need a definition of gettid(), but Linux libc implementations don't +// provide a wrapper for it (except for Bionic) +#if defined(__linux__) # include +#if !defined(__BIONIC__) # include # define gettid() static_cast(syscall(SYS_gettid)) #elif defined(GP_OS_darwin) @@ -58,6 +59,7 @@ # define getpid _getpid # endif #endif +#endif extern mozilla::LazyLogModule gProfilerLog;