diff --git a/libc/bionic/ndk_cruft.cpp b/libc/bionic/ndk_cruft.cpp index 4bbb2c174..dfd0e68de 100644 --- a/libc/bionic/ndk_cruft.cpp +++ b/libc/bionic/ndk_cruft.cpp @@ -340,10 +340,17 @@ size_t dlmalloc_usable_size(void* ptr) { } // In L we added a public pthread_gettid_np, but some apps were using the private API. -pid_t __pthread_gettid(pthread_t t) { +pid_t __pthread_gettid_libc(pthread_t t) { return pthread_gettid_np(t); } +pid_t __pthread_gettid_libc_private(pthread_t t) { + return pthread_gettid_np(t); +} + +__asm__(".symver __pthread_gettid_libc,__pthread_gettid@LIBC"); +__asm__(".symver __pthread_gettid_libc_private,__pthread_gettid@@LIBC_PRIVATE"); + // Older versions of apportable used dlmalloc directly instead of malloc, // so export this compatibility shim that simply calls malloc. void* dlmalloc(size_t size) { diff --git a/libc/libc.arm.map b/libc/libc.arm.map index 60ca5986c..b9d9f0b77 100644 --- a/libc/libc.arm.map +++ b/libc/libc.arm.map @@ -122,6 +122,7 @@ LIBC { __pselect6; # arm x86 mips __pthread_cleanup_pop; __pthread_cleanup_push; + __pthread_gettid; # arm x86 mips nobrillo __ptrace; # arm x86 mips __putlong; __putshort; diff --git a/libc/libc.map.txt b/libc/libc.map.txt index a91c4d701..4c11ae32b 100644 --- a/libc/libc.map.txt +++ b/libc/libc.map.txt @@ -123,6 +123,7 @@ LIBC { __pselect6; # arm x86 mips __pthread_cleanup_pop; __pthread_cleanup_push; + __pthread_gettid; # arm x86 mips nobrillo __ptrace; # arm x86 mips __putlong; __putshort; diff --git a/libc/libc.mips.map b/libc/libc.mips.map index df0e4b7fe..b011410e0 100644 --- a/libc/libc.mips.map +++ b/libc/libc.mips.map @@ -120,6 +120,7 @@ LIBC { __pselect6; # arm x86 mips __pthread_cleanup_pop; __pthread_cleanup_push; + __pthread_gettid; # arm x86 mips nobrillo __ptrace; # arm x86 mips __putlong; __putshort; diff --git a/libc/libc.x86.map b/libc/libc.x86.map index 5e8fcb197..5b96c2f45 100644 --- a/libc/libc.x86.map +++ b/libc/libc.x86.map @@ -120,6 +120,7 @@ LIBC { __pselect6; # arm x86 mips __pthread_cleanup_pop; __pthread_cleanup_push; + __pthread_gettid; # arm x86 mips nobrillo __ptrace; # arm x86 mips __putlong; __putshort;