libgudev: remove incorrect Config.in help text information
[buildroot-gz.git] / package / audit / 0001-lib-gen_tables.c-define-EHWPOISON-when-not-available.patch
blob8880d6c12ce129420995be537be823155c837b1d
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
10 architectures).
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>
18 ---
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
26 @@ -55,6 +55,15 @@
27 #define SHMGET 23
28 #define SHMCTL 24
30 +/*
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
34 + * broken.
35 + */
36 +#ifndef EHWPOISON
37 +#define EHWPOISON 133
38 +#endif
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
42 --
43 2.7.4