ARM: fix perf build with uclibc toolchains
authorFlorian Fainelli <florian@openwrt.org>
Tue, 9 Aug 2011 11:24:17 +0000 (12:24 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 12 Aug 2011 14:40:20 +0000 (15:40 +0100)
libio.h is not provided by uClibc, in order to be able to test the
definition of __UCLIBC__ we need to include stdlib.h, which also
includes stddef.h, providing the definition of 'NULL'.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
tools/perf/arch/arm/util/dwarf-regs.c

index fff6450c8c999b6c0ae37597a67abaed900dc023..e8d5c551c69c08d4a17e89a370d0e4caedacb101 100644 (file)
@@ -8,7 +8,10 @@
  * published by the Free Software Foundation.
  */
 
+#include <stdlib.h>
+#ifndef __UCLIBC__
 #include <libio.h>
+#endif
 #include <dwarf-regs.h>
 
 struct pt_regs_dwarfnum {