The compilation error of redeclaration was indroduced by commit 54d50897d54 ("linux/kernel.h: split *_MAX and *_MIN macros into <linux/limits.h>"). Fix it by removing useless header limit.h. The compilation warning was redefination of macro EXPORT_SYMBOL*. Signed-off-by: Zhengyuan Liu <liuzhengyuan@xxxxxxxxxx> --- include/linux/raid/pq.h | 3 ++- lib/raid6/mktables.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h index 0832c9b..e0ddb47 100644 --- a/include/linux/raid/pq.h +++ b/include/linux/raid/pq.h @@ -27,7 +27,6 @@ extern const char raid6_empty_zero_page[PAGE_SIZE]; #include <errno.h> #include <inttypes.h> -#include <limits.h> #include <stddef.h> #include <sys/mman.h> #include <sys/time.h> @@ -59,7 +58,9 @@ extern const char raid6_empty_zero_page[PAGE_SIZE]; #define enable_kernel_altivec() #define disable_kernel_altivec() +#undef EXPORT_SYMBOL #define EXPORT_SYMBOL(sym) +#undef EXPORT_SYMBOL_GPL #define EXPORT_SYMBOL_GPL(sym) #define MODULE_LICENSE(licence) #define MODULE_DESCRIPTION(desc) diff --git a/lib/raid6/mktables.c b/lib/raid6/mktables.c index 9c485df..f02e10f 100644 --- a/lib/raid6/mktables.c +++ b/lib/raid6/mktables.c @@ -56,8 +56,8 @@ int main(int argc, char *argv[]) uint8_t v; uint8_t exptbl[256], invtbl[256]; - printf("#include <linux/raid/pq.h>\n"); printf("#include <linux/export.h>\n"); + printf("#include <linux/raid/pq.h>\n"); /* Compute multiplication table */ printf("\nconst u8 __attribute__((aligned(256)))\n" -- 2.7.4