Files
RetroArch/pkg/android/phoenix-common
libretroadmin a580a50cf8 android: define HAVE_THREAD_STORAGE (fix ndk-build after platform_unix TLS migration)
Routing platform_unix.c's JNI thread-local storage through rthreads made
it depend on the sthread_tls_* API, which is gated behind
HAVE_THREAD_STORAGE in both rthreads.h and rthreads.c. The griffin
ndk-build (pkg/android/phoenix-common/jni/Android.mk) never defined that
flag -- the previous raw pthread_key_* code did not need it -- so the
whole TLS API compiled out and the Android build failed:

  platform_unix.c:125: unknown type name 'sthread_tls_t'
  platform_unix.c:425: call to undeclared function 'sthread_tls_set'
  platform_unix.c:573: call to undeclared function 'sthread_tls_create_with_dtor'

Android/Bionic fully supports pthread thread-local storage (including
pthread_key_create destructors), so declare the capability alongside
-DHAVE_THREADS. This also activates retroarch.c's rarch_tls, which uses
the same API and is purely additive (no #else path). The configure-based
Linux/Unix builds autodetect HAVE_THREAD_STORAGE and were unaffected.
2026-07-16 02:10:14 +02:00
..
2019-06-27 17:55:38 +02:00