mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-21 06:06:59 -04:00
BUILD/MINOR: ancient gcc versions atomic fix
Commit 1a69af6d38 introduced code
for atomic prior to 4.7. Unfortunately clang uses as well those
constants which is misleading.
This commit is contained in:
parent
1a69af6d38
commit
ec5e84552a
1 changed files with 1 additions and 1 deletions
|
|
@ -100,7 +100,7 @@ extern THREAD_LOCAL unsigned long tid_bit; /* The bit corresponding to the threa
|
|||
/* 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)
|
||||
#if defined(__GNUC__) && (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 7) && !defined(__clang__)
|
||||
/* gcc < 4.7 */
|
||||
|
||||
#define HA_ATOMIC_ADD(val, i) __sync_add_and_fetch(val, i)
|
||||
|
|
|
|||
Loading…
Reference in a new issue