summaryrefslogtreecommitdiffstats
path: root/tools/profiler/tasktracer
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-10-16 12:37:07 -0400
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-10-21 10:34:15 +0200
commit4f038bf39a4806ec7339bf062a184e4e1f20758e (patch)
tree712deb09c660e2719ae7e6630e14fbb1886bde3f /tools/profiler/tasktracer
parent0d6f1e11ba26646c21eff61dcee78d17914bfd81 (diff)
downloadUXP-4f038bf39a4806ec7339bf062a184e4e1f20758e.tar
UXP-4f038bf39a4806ec7339bf062a184e4e1f20758e.tar.gz
UXP-4f038bf39a4806ec7339bf062a184e4e1f20758e.tar.lz
UXP-4f038bf39a4806ec7339bf062a184e4e1f20758e.tar.xz
UXP-4f038bf39a4806ec7339bf062a184e4e1f20758e.zip
Fix build errors with newer glibc versions
Diffstat (limited to 'tools/profiler/tasktracer')
-rw-r--r--tools/profiler/tasktracer/GeckoTaskTracer.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/tools/profiler/tasktracer/GeckoTaskTracer.cpp b/tools/profiler/tasktracer/GeckoTaskTracer.cpp
index ada695614..36d1bffc3 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();