diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-10-16 12:37:07 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-10-16 12:37:07 -0400 |
commit | fd76ba979a627e0a4b823b98727944e98351ce4a (patch) | |
tree | a01ca91bfc9d886d34f5e223dc7bb56b28ba7743 /tools | |
parent | df7fdc5542377ee2b84ba824e94e9fb8cd195b9d (diff) | |
download | uxp-fd76ba979a627e0a4b823b98727944e98351ce4a.tar.gz |
Fix build errors with newer glibc versions
Diffstat (limited to 'tools')
-rw-r--r-- | tools/profiler/tasktracer/GeckoTaskTracer.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tools/profiler/tasktracer/GeckoTaskTracer.cpp b/tools/profiler/tasktracer/GeckoTaskTracer.cpp index ada6956148..36d1bffc38 100644 --- a/tools/profiler/tasktracer/GeckoTaskTracer.cpp +++ b/tools/profiler/tasktracer/GeckoTaskTracer.cpp @@ -20,22 +20,16 @@ #include <stdarg.h> -// We need a definition of gettid(), but glibc doesn't provide a +// We need a definition of gettid(), but older glibc versions don't provide a // wrapper for it. #if defined(__GLIBC__) #include <unistd.h> #include <sys/syscall.h> -static inline pid_t gettid() -{ - return (pid_t) syscall(SYS_gettid); -} +#define gettid() static_cast<pid_t>(syscall(SYS_gettid)) #elif defined(XP_MACOSX) #include <unistd.h> #include <sys/syscall.h> -static inline pid_t gettid() -{ - return (pid_t) syscall(SYS_thread_selfid); -} +#define gettid() static_cast<pid_t>(syscall(SYS_thread_selfid)) #elif defined(LINUX) #include <sys/types.h> pid_t gettid(); |