summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/thread.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/thread.h b/runtime/thread.h
index 0a123490de..89fcad1f2e 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -2201,8 +2201,10 @@ class Thread {
SafeMap<std::string, std::unique_ptr<TLSData>, std::less<>> custom_tls_
GUARDED_BY(Locks::custom_tls_lock_);
-#ifndef __BIONIC__
- __attribute__((tls_model("initial-exec")))
+#if !defined(__BIONIC__)
+#if !defined(ANDROID_HOST_MUSL)
+ __attribute__((tls_model("initial-exec")))
+#endif
static thread_local Thread* self_tls_;
#endif