瀏覽代碼

perf/powerpc: Fix build for PowerPC with uclibc toolchains

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>
Florian Fainelli 14 年之前
父節點
當前提交
5182a131dd
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      tools/perf/arch/powerpc/util/dwarf-regs.c

+ 3 - 0
tools/perf/arch/powerpc/util/dwarf-regs.c

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