From ee2ba599e7b0aa002dc7257458c19bdb64fd6252 Mon Sep 17 00:00:00 2001 From: "Dmitrij D. Czarkoff" Date: Thu, 20 Oct 2016 16:51:21 +0200 Subject: build: don't rely on "__thread" being always available with GCC Thread-local storage in GCC is platform-specific, and some platforms that are otherwise perfectly capable of running mpv may lack TLS support in GCC. This change adds a test for GCC variant of TLS and relies on its result instead of assumption. Provided that LLVM's `__thread` support is similar to GCC, the test is called "GCC/LLVM TLS". Signed-off-by: wm4 --- video/out/opengl/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video') diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c index 0f5b61e37c..fb3471cd3b 100644 --- a/video/out/opengl/context.c +++ b/video/out/opengl/context.c @@ -125,7 +125,7 @@ int mpgl_validate_backend_opt(struct mp_log *log, const struct m_option *opt, #if HAVE_C11_TLS #define MP_TLS _Thread_local -#elif defined(__GNUC__) +#elif HAVE_GCC_TLS #define MP_TLS __thread #endif -- cgit v1.2.3