summaryrefslogtreecommitdiff
path: root/ext/dnet
diff options
context:
space:
mode:
authorMitch Hayenga <mitch.hayenga@arm.com>2014-08-13 06:57:19 -0400
committerMitch Hayenga <mitch.hayenga@arm.com>2014-08-13 06:57:19 -0400
commit0270cf13acd9686f264d3d3ed51d358796337bf4 (patch)
tree1c7e9d59b704934d3541422503e55a4a0036dcd7 /ext/dnet
parent860f00228be0181a7dcb1b32802401da05edae03 (diff)
downloadgem5-0270cf13acd9686f264d3d3ed51d358796337bf4.tar.xz
ext: clang fix for flexible array members
Changes how flexible array members are defined so clang does not error out during compilation.
Diffstat (limited to 'ext/dnet')
-rw-r--r--ext/dnet/os.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/dnet/os.h b/ext/dnet/os.h
index cae244781..075f94b2c 100644
--- a/ext/dnet/os.h
+++ b/ext/dnet/os.h
@@ -98,7 +98,8 @@
/* Support for flexible arrays. */
#undef __flexarr
-#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97))
+#if !defined(__clang__) && defined(__GNUC__) && \
+ ((__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97))
/* GCC 2.97 supports C99 flexible array members. */
# define __flexarr []
#else