We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 66b93e3 + a742158 commit fdac598Copy full SHA for fdac598
libcutils/include/cutils/threads.h
@@ -31,7 +31,9 @@ extern "C" {
31
//
32
// Deprecated: use android::base::GetThreadId instead, which doesn't truncate on Mac/Windows.
33
34
+#if !defined(__GLIBC__) || __GLIBC__ >= 2 && __GLIBC_MINOR__ < 32
35
extern pid_t gettid();
36
+#endif
37
38
#ifdef __cplusplus
39
}
libcutils/threads.cpp
@@ -25,8 +25,9 @@
25
#include <windows.h>
26
#endif
27
28
-#if defined(__BIONIC__)
+#if defined(__BIONIC__) || defined(__GLIBC__) && __GLIBC_MINOR__ >= 32
29
// No definition needed for Android because we'll just pick up bionic's copy.
30
+// No definition needed for Glibc >= 2.32 because it exposes its own copy.
#else
pid_t gettid() {
#if defined(__APPLE__)
0 commit comments