mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-10 17:27:30 -10:00
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.