blob: 1f7a36af3bfa8c308ba3ce23c5031dd477f76846 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--- a/tools/profiler/core/platform.h 2017-05-27 11:44:06.733119794 +0000
+++ b/tools/profiler/core/platform.h 2017-05-27 11:46:16.004253520 +0000
@@ -54,10 +54,11 @@
#include <vector>
#include "StackTop.h"
-// We need a definition of gettid(), but glibc doesn'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 <unistd.h>
+#if !defined(__BIONIC__)
#include <sys/syscall.h>
static inline pid_t gettid()
{
@@ -71,6 +72,7 @@
return (pid_t) syscall(SYS_thread_selfid);
}
#endif
+#endif
#ifdef XP_WIN
#include <windows.h>
|