summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-03-09 14:20:20 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-03-09 14:20:45 +0100
commite5724f788a64f7ee09287df87ca7e12fa2ea01f3 (patch)
tree295019e4bd884db00c2d2ed9ec343eb6d8a4e3df
parent3cafb9a46b5e40fc8f3dc5729fe9b7607f591cde (diff)
downloadrtems-libbsd-e5724f788a64f7ee09287df87ca7e12fa2ea01f3.tar.bz2
atomic.h: Fix for GCC version 5 and later
-rw-r--r--rtemsbsd/include/machine/atomic.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/rtemsbsd/include/machine/atomic.h b/rtemsbsd/include/machine/atomic.h
index d8ee3663..6e923252 100644
--- a/rtemsbsd/include/machine/atomic.h
+++ b/rtemsbsd/include/machine/atomic.h
@@ -47,7 +47,8 @@
#include <rtems.h>
#ifdef RTEMS_SMP
- #if defined(__cplusplus) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 9
+ #if defined(__cplusplus) \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9))
/*
* The GCC 4.9 ships its own <stdatomic.h> which is not C++ compatible. The
* suggested solution was to include <atomic> in case C++ is used. This works