On December 16, 2019 5:09:32 AM PST, Zhengyuan Liu <liuzhengyuan@xxxxxxxxxx> wrote: >The compilation error is redeclaration showed as following: > > In file included from ../../../include/linux/limits.h:6, > from >/usr/include/x86_64-linux-gnu/bits/local_lim.h:38, > from >/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:161, > from /usr/include/limits.h:183, > from >/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed/limits.h:194, > from >/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed/syslimits.h:7, > from >/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed/limits.h:34, > from ../../../include/linux/raid/pq.h:30, > from algos.c:14: > ../../../include/linux/types.h:114:15: error: conflicting types for >‘int64_t’ > typedef s64 int64_t; > ^~~~~~~ > In file included from /usr/include/stdint.h:34, > from >/usr/lib/gcc/x86_64-linux-gnu/8/include/stdint.h:9, > from /usr/include/inttypes.h:27, > from ../../../include/linux/raid/pq.h:29, > from algos.c:14: > /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: previous >\ > declaration of ‘int64_t’ was here > typedef __int64_t int64_t; > >The compilation warning is redefination showed as following: > > In file included from tables.c:2: > ../../../include/linux/export.h:180: warning: "EXPORT_SYMBOL" >redefined > #define EXPORT_SYMBOL(sym) __EXPORT_SYMBOL(sym, "") > > In file included from tables.c:1: > ../../../include/linux/raid/pq.h:61: note: this is the location of the >previous definition > #define EXPORT_SYMBOL(sym) > >Fixes: 54d50897d54 ("linux/kernel.h: split *_MAX and *_MIN macros into ><linux/limits.h>") >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 0832c9b66852..e0ddb47f4402 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 9c485df1308f..f02e10fa6238 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" A better option would probably be to use the __u* symbols throughout, as they are part of the UABI and available both in the kernel and in userspace. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.