summaryrefslogtreecommitdiffstats
path: root/include/linux/raid
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2018-11-12 15:22:17 -0800
committerShaohua Li <shli@fb.com>2018-12-20 08:53:23 -0800
commit58af3110a7c5d161f72f94a98c6f2b9b75bf5cf9 (patch)
tree10f3553322f89ee965719f385cef90063d278543 /include/linux/raid
parente731f3e28b7e7d1c745b03084e01036ee00018eb (diff)
downloadlinux-58af3110a7c5d161f72f94a98c6f2b9b75bf5cf9.tar.gz
linux-58af3110a7c5d161f72f94a98c6f2b9b75bf5cf9.tar.bz2
linux-58af3110a7c5d161f72f94a98c6f2b9b75bf5cf9.zip
lib/raid6: avoid __attribute_const__ redefinition
This is defined in glibc's sys/cdefs.h on my system with the same definition as the raid6test fallback definition. Add a #ifndef check to avoid a compiler warning about redefining it. Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'include/linux/raid')
-rw-r--r--include/linux/raid/pq.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h
index 0c245dcb8b48..d7c99161bba2 100644
--- a/include/linux/raid/pq.h
+++ b/include/linux/raid/pq.h
@@ -53,7 +53,9 @@ extern const char raid6_empty_zero_page[PAGE_SIZE];
#define __init
#define __exit
-#define __attribute_const__ __attribute__((const))
+#ifndef __attribute_const__
+# define __attribute_const__ __attribute__((const))
+#endif
#define noinline __attribute__((noinline))
#define preempt_enable()