d2b550460aeda9960004e92fb86176dea162c94d
[openwrt/staging/chunkeey.git] / target / linux / generic / patches-3.3 / 084-x86_fix_perf_uclibc_build.patch
1 From 031d8ad2c3cee85c515e551fc8c0054bdedb7b8b Mon Sep 17 00:00:00 2001
2 From: Florian Fainelli <florian@openwrt.org>
3 Date: Thu, 13 Dec 2012 18:02:11 +0100
4 Subject: [PATCH] x86: fix perf build with uclibc toolchains
5
6 libio.h is not provided by uClibc, in order to be able to test the
7 definition of __UCLIBC__ we need to include stdlib.h, which also
8 includes stddef.h, providing the definition of 'NULL'
9
10 Signed-off-by: Florian Fainelli <florian@openwrt.org>
11 ---
12 tools/perf/arch/x86/util/dwarf-regs.c | 3 +++
13 1 file changed, 3 insertions(+)
14
15 diff --git a/tools/perf/arch/x86/util/dwarf-regs.c b/tools/perf/arch/x86/util/dwarf-regs.c
16 index a794d30..6f5267f 100644
17 --- a/tools/perf/arch/x86/util/dwarf-regs.c
18 +++ b/tools/perf/arch/x86/util/dwarf-regs.c
19 @@ -20,7 +20,10 @@
20 *
21 */
22
23 +#include <stdlib.h>
24 +#ifndef __UCLIBC__
25 #include <libio.h>
26 +#endif
27 #include <dwarf-regs.h>
28
29 /*
30 --
31 1.7.10.4
32