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 <mjs@voltanet.io>
This commit is contained in:
Mark Stapp 2018-08-29 15:39:19 -04:00
parent 7e678379ed
commit 1ed98c2db6

View File

@ -29,6 +29,12 @@
#ifdef HAVE_STDATOMIC_H
#include <stdatomic.h>
/* 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)