From: Daniel Verkamp Date: Mon, 12 Nov 2018 23:22:17 +0000 (-0800) Subject: lib/raid6: avoid __attribute_const__ redefinition X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=58af3110a7c5d161f72f94a98c6f2b9b75bf5cf9;p=linux.git 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 Signed-off-by: Shaohua Li --- diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h index 0c245dcb8b480..d7c99161bba26 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()