> On 12 Feb 2018, at 17:37, David CARLIER <devne...@gmail.com> wrote:
> 
> I think I m the one behing this relatively recent change ... why not adding 
> in the condition the architecture ? e.g. !defined(__clang__) && 
> !defined(__i386__) ... something like this...
> 
> Hope it is useful.
> 


What about this change?

--- work/haproxy-1.8.4/include/common/hathreads.h       2018-02-08 
13:05:15.000000000 +0000
+++ /tmp/hathreads.h    2018-02-14 11:06:25.031422000 +0000
@@ -104,7 +104,7 @@ extern THREAD_LOCAL unsigned long tid_bi
/* TODO: thread: For now, we rely on GCC builtins but it could be a good idea to
 * have a header file regrouping all functions dealing with threads. */

-#if defined(__GNUC__) && (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 7) 
&& !defined(__clang__)
+#if (defined(__GNUC__) && (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 
7) && !defined(__clang__)) || (defined(__clang__) && defined(__i386__))
/* gcc < 4.7 */

#define HA_ATOMIC_ADD(val, i)        __sync_add_and_fetch(val, i)


Reply via email to