1 From ac10cdedd136689028223088ffca80b98c7bbaff Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Sat, 2 Jul 2016 10:33:34 +0200
4 Subject: [PATCH] lib/gen_tables.c: define EHWPOISON when not available
6 When building on some old system with old kernel headers, the
7 gen_tables.c program (built natively) doesn't build due to missing
8 EHWPOISON. This commit defines EHWPOISON to the value found in
9 asm-generic kernel headers, which is correct for most (but not all
12 Anyway, the whole concept of building a program on the host to generate
13 a table with errno values, then built into a target program is
14 inherently broken, so our fix is not more broken than the rest of the
15 mechanism used by audit.
17 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
19 lib/gen_tables.c | 9 +++++++++
20 1 file changed, 9 insertions(+)
22 diff --git a/lib/gen_tables.c b/lib/gen_tables.c
23 index 98f576c..d0bb7f5 100644
24 --- a/lib/gen_tables.c
25 +++ b/lib/gen_tables.c
31 + * Values from asm-generic, might be different on other architectures,
32 + * but anyway the concept of building a program on the host to
33 + * generate errno related tables used on another architecture is
37 +#define EHWPOISON 133
40 /* The ratio of table size to number of non-empty elements allowed for a
41 "direct" s2i table; if the ratio would be bigger, bsearch tables are used