From 1ed98c2db620b0831d23407ae461156e07c378fc Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Wed, 29 Aug 2018 15:39:19 -0400 Subject: [PATCH] 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 --- lib/frratomic.h | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.39.2