From 3beaa80aa2f07c9d288c61e42958f89bd37665c4 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 2 Jul 2014 16:35:41 +0200 Subject: [PATCH] Fix __thread configure check on Clang AC_TRY_COMPILE puts the code in a function already, and Clang didn't like the function within the function declaration. This lead to test failure. Clang now properly detects __thread support. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 67d316b761..f15e07b70b 100644 --- a/configure.ac +++ b/configure.ac @@ -226,7 +226,7 @@ # check if our target supports thread local storage AC_MSG_CHECKING(for thread local storage __thread support) AC_TRY_COMPILE([#include ], - [ void somefunc (void) { static __thread int i; i = 1; i++; } ], + [ static __thread int i; i = 1; i++; ], [AC_DEFINE([TLS], [1], [Thread local storage]) AC_MSG_RESULT([yes]) ], [AC_MSG_RESULT([no])])