From: Mark Stapp Date: Wed, 29 Aug 2018 19:39:19 +0000 (-0400) Subject: libs: fix missing atomics for some gcc versions X-Git-Tag: frr-6.1-dev~2^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=1ed98c2db620b0831d23407ae461156e07c378fc;p=mirror_frr.git libs: fix missing atomics for some gcc versions stdatomic.h does not have aliases for all of the useful gcc atomic primitives; add them in for that path through frratomic.h. Signed-off-by: Mark Stapp --- diff --git a/lib/frratomic.h b/lib/frratomic.h index 113f46c07..1f1d1b569 100644 --- a/lib/frratomic.h +++ b/lib/frratomic.h @@ -29,6 +29,12 @@ #ifdef HAVE_STDATOMIC_H #include +/* These are available in gcc, but not in stdatomic */ +#define atomic_add_fetch_explicit __atomic_add_fetch +#define atomic_sub_fetch_explicit __atomic_sub_fetch +#define atomic_and_fetch_explicit __atomic_and_fetch +#define atomic_or_fetch_explicit __atomic_or_fetch + /* gcc 4.7 and newer */ #elif defined(HAVE___ATOMIC)