LibC: Don't define __tls_get_addr if TLS is disabled

This makes linking fail if something tries to use TLS :)
This commit is contained in:
Bananymous 2025-04-19 22:33:46 +03:00
parent 85f9b585f5
commit 1ccff9478f
1 changed files with 2 additions and 0 deletions

View File

@ -362,6 +362,7 @@ int pthread_spin_unlock(pthread_spinlock_t* lock)
return 0; return 0;
} }
#if not __disable_thread_local_storage
struct tls_index struct tls_index
{ {
unsigned long int ti_module; unsigned long int ti_module;
@ -379,3 +380,4 @@ extern "C" void* __attribute__((__regparm__(1))) ___tls_get_addr(tls_index* ti)
return reinterpret_cast<void*>(get_uthread()->dtv[ti->ti_module] + ti->ti_offset); return reinterpret_cast<void*>(get_uthread()->dtv[ti->ti_module] + ti->ti_offset);
} }
#endif #endif
#endif