Skip to content

Commit

Permalink
Merge pull request #2942 from mjstapp/fix_new_atomics
Browse files Browse the repository at this point in the history
libs: fix missing atomics for some gcc versions
  • Loading branch information
eqvinox authored Aug 30, 2018
2 parents 53acd58 + 1ed98c2 commit f177317
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/frratomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f177317

Please sign in to comment.