summaryrefslogtreecommitdiff
path: root/libcutils
diff options
context:
space:
mode:
authorHao Chen <chenhaosjtuacm@google.com>2023-07-18 21:38:34 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-07-18 21:38:34 +0000
commit8dad4b2b8a5b9311fe6022120fbef3a21ac53b43 (patch)
treede5d6e4cd3ab11ebe4feefacf70bd569f90167a7 /libcutils
parent72c3ca1604d6b7cd331b3a50b1b978c74227c5ae (diff)
parent253445ce3ad507f41c61ebf0f829f75ee2c37509 (diff)
downloadcore-8dad4b2b8a5b9311fe6022120fbef3a21ac53b43.tar.gz
Merge "threads.h: avoid defining gettid on glibc >= 2.30" into main
Diffstat (limited to 'libcutils')
-rw-r--r--libcutils/include/cutils/threads.h2
-rw-r--r--libcutils/threads.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/libcutils/include/cutils/threads.h b/libcutils/include/cutils/threads.h
index 0082c6c63..18861840e 100644
--- a/libcutils/include/cutils/threads.h
+++ b/libcutils/include/cutils/threads.h
@@ -31,7 +31,7 @@ extern "C" {
//
// Deprecated: use android::base::GetThreadId instead, which doesn't truncate on Mac/Windows.
//
-#if !defined(__GLIBC__) || __GLIBC__ >= 2 && __GLIBC_MINOR__ < 32
+#if !defined(__GLIBC__) || __GLIBC__ >= 2 && __GLIBC_MINOR__ < 30
extern pid_t gettid();
#endif
diff --git a/libcutils/threads.cpp b/libcutils/threads.cpp
index 6ece7a3af..263872084 100644
--- a/libcutils/threads.cpp
+++ b/libcutils/threads.cpp
@@ -25,9 +25,9 @@
#include <windows.h>
#endif
-#if defined(__BIONIC__) || defined(__GLIBC__) && __GLIBC_MINOR__ >= 32
+#if defined(__BIONIC__) || defined(__GLIBC__) && __GLIBC_MINOR__ >= 30
// No definition needed for Android because we'll just pick up bionic's copy.
-// No definition needed for Glibc >= 2.32 because it exposes its own copy.
+// No definition needed for Glibc >= 2.30 because it exposes its own copy.
#else
pid_t gettid() {
#if defined(__APPLE__)