Skip to contentSkip to conversation

perf: fix build for PowerPC with uclibc toolchains

PATCH New Florian Fainelli 1 participant 1 message Aug 23, 2011 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: 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'.

---
FYI, I submitted the exact same patch for ARM:
https://patchwork.kernel.org/patch/1049152/

tools/perf/arch/powerpc/util/dwarf-regs.c +3 -0
index 48ae0c5..7cdd61d 100644
@@ -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>
 
 
Signature · 1 line
1.7.4.1