generic: refresh patches
[openwrt.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 --- a/tools/perf/arch/x86/util/dwarf-regs.c
16 +++ b/tools/perf/arch/x86/util/dwarf-regs.c
17 @@ -20,7 +20,10 @@
18   *
19   */
20  
21 +#include <stdlib.h>
22 +#ifndef __UCLIBC__
23  #include <libio.h>
24 +#endif
25  #include <dwarf-regs.h>
26  
27  /*