perf/powerpc: Fix build for PowerPC with uclibc toolchains
authorFlorian Fainelli <florian@openwrt.org>
Tue, 23 Aug 2011 02:20:08 +0000 (02:20 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 25 Nov 2011 03:11:27 +0000 (14:11 +1100)
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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
tools/perf/arch/powerpc/util/dwarf-regs.c

index 48ae0c5e3f73f81b6a8349557583f1ebf70dc2c9..7cdd61d0e27cd5fecd30c315fbc49724c5696a07 100644 (file)
@@ -9,7 +9,10 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#include <stdlib.h>
+#ifndef __UCLIBC__
 #include <libio.h>
+#endif
 #include <dwarf-regs.h>