From: Victor Julien Date: Wed, 2 Jul 2014 14:35:41 +0000 (+0200) Subject: Fix __thread configure check on Clang X-Git-Tag: suricata-2.0.3~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3beaa80aa2f07c9d288c61e42958f89bd37665c4;p=thirdparty%2Fsuricata.git 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. --- 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])])