aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2013-03-04 15:52:11 -0500
committerBrian Behlendorf <[email protected]>2013-03-06 15:48:48 -0800
commit1c24b699b0c7590e135f4701b50a4c933ebe0499 (patch)
treefe11509fbc63e8285784ccda857a2d9f5d1edb38 /module/zfs
parent7c72f8e391e3fc54a9c5be54083b541cb2951780 (diff)
Linux 3.9 compat: Undefine GCC_VERSION
The mainline kernel started defining GCC_VERSION with commit torvalds/linux@3f3f8d2f48acfd8ed3b8e6b7377935da57b27b16. Unfortunately, LZ4 also defines this macro, but the two defintions are incompatible. We undefine GCC_VERSION in lz4.c to handle this. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1339
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/lz4.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/module/zfs/lz4.c b/module/zfs/lz4.c
index b9850c094..8afaad130 100644
--- a/module/zfs/lz4.c
+++ b/module/zfs/lz4.c
@@ -243,6 +243,14 @@ lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
/* Disable restrict */
#define restrict
+/*
+ * Linux : GCC_VERSION is defined as of 3.9-rc1, so undefine it.
+ * torvalds/linux@3f3f8d2f48acfd8ed3b8e6b7377935da57b27b16
+ */
+#ifdef GCC_VERSION
+#undef GCC_VERSION
+#endif
+
#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__)