Skip to content

Commit

Permalink
raid6: guard the tables.c include of <linux/export.h> with __KERNEL__
Browse files Browse the repository at this point in the history
The export directives for the tables are already emitted with __KERNEL__
guards, but the <linux/export.h> include is not, causing errors when
building the raid6test program. Guard this include too to fix the
raid6test build.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Link: https://lore.kernel.org/r/20230731104911.411964-3-kernel@xen0n.name
Signed-off-by: Song Liu <song@kernel.org>
  • Loading branch information
WANG Xuerui authored and Song Liu committed Aug 15, 2023
1 parent 5afcf28 commit 9dd6e1d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/raid6/mktables.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ int main(int argc, char *argv[])
uint8_t v;
uint8_t exptbl[256], invtbl[256];

printf("#ifdef __KERNEL__\n");
printf("#include <linux/export.h>\n");
printf("#endif\n");
printf("#include <linux/raid/pq.h>\n");

/* Compute multiplication table */
Expand Down

0 comments on commit 9dd6e1d

Please sign in to comment.