]> git.proxmox.com Git - mirror_frr.git/commitdiff
libs: fix missing atomics for some gcc versions
authorMark Stapp <mjs@voltanet.io>
Wed, 29 Aug 2018 19:39:19 +0000 (15:39 -0400)
committerMark Stapp <mjs@voltanet.io>
Wed, 29 Aug 2018 19:39:19 +0000 (15:39 -0400)
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>
lib/frratomic.h

index 113f46c075bf78d8e093315287b4ff612b87e7d4..1f1d1b569a59cfc60163c1c8085ff7c7c6dafe77 100644 (file)
 #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)