Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tools: Fix build on non-glibc systems due to libio.h absence

Including libio.h causes build failures on uClibc systems (which lack
libio.h).

It appears that libio.h was only included to pull in a definition for
NULL, so it has been replaced by stddef.h.

On powerpc, libio.h was conditionally included, but could be removed
completely as it is unneeded. Also, the included of stdlib.h was changed
to stddef.h (as again, only NULL is needed).

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1363300074-26288-1-git-send-email-cody@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Cody P Schafer and committed by
Arnaldo Carvalho de Melo
861e10be d1398ccf

+6 -12
+1 -4
tools/perf/arch/arm/util/dwarf-regs.c
··· 8 8 * published by the Free Software Foundation. 9 9 */ 10 10 11 - #include <stdlib.h> 12 - #ifndef __UCLIBC__ 13 - #include <libio.h> 14 - #endif 11 + #include <stddef.h> 15 12 #include <dwarf-regs.h> 16 13 17 14 struct pt_regs_dwarfnum {
+1 -4
tools/perf/arch/powerpc/util/dwarf-regs.c
··· 9 9 * 2 of the License, or (at your option) any later version. 10 10 */ 11 11 12 - #include <stdlib.h> 13 - #ifndef __UCLIBC__ 14 - #include <libio.h> 15 - #endif 12 + #include <stddef.h> 16 13 #include <dwarf-regs.h> 17 14 18 15
+1 -1
tools/perf/arch/s390/util/dwarf-regs.c
··· 6 6 * 7 7 */ 8 8 9 - #include <libio.h> 9 + #include <stddef.h> 10 10 #include <dwarf-regs.h> 11 11 12 12 #define NUM_GPRS 16
+1 -1
tools/perf/arch/sh/util/dwarf-regs.c
··· 19 19 * 20 20 */ 21 21 22 - #include <libio.h> 22 + #include <stddef.h> 23 23 #include <dwarf-regs.h> 24 24 25 25 /*
+1 -1
tools/perf/arch/sparc/util/dwarf-regs.c
··· 9 9 * 2 of the License, or (at your option) any later version. 10 10 */ 11 11 12 - #include <libio.h> 12 + #include <stddef.h> 13 13 #include <dwarf-regs.h> 14 14 15 15 #define SPARC_MAX_REGS 96
+1 -1
tools/perf/arch/x86/util/dwarf-regs.c
··· 20 20 * 21 21 */ 22 22 23 - #include <libio.h> 23 + #include <stddef.h> 24 24 #include <dwarf-regs.h> 25 25 26 26 /*