tools/perf: fix build on non-glibc systems due to libio.h absence
Subsystems (2)
PATCH RESEND 1/1 tools/perf: 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).
--- tools/perf/arch/arm/util/dwarf-regs.c | 5 +---- tools/perf/arch/powerpc/util/dwarf-regs.c | 5 +---- tools/perf/arch/s390/util/dwarf-regs.c | 2 +- tools/perf/arch/sh/util/dwarf-regs.c | 2 +- tools/perf/arch/sparc/util/dwarf-regs.c | 2 +- tools/perf/arch/x86/util/dwarf-regs.c | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-)
tools/perf/arch/arm/util/dwarf-regs.c +1 -4
@@ -8,10 +8,7 @@* published by the Free Software Foundation. */ -#include <stdlib.h> -#ifndef __UCLIBC__ -#include <libio.h> -#endif +#include <stddef.h> #include <dwarf-regs.h> struct pt_regs_dwarfnum {
tools/perf/arch/powerpc/util/dwarf-regs.c +1 -4
@@ -9,10 +9,7 @@* 2 of the License, or (at your option) any later version. */ -#include <stdlib.h> -#ifndef __UCLIBC__ -#include <libio.h> -#endif +#include <stddef.h> #include <dwarf-regs.h>
tools/perf/arch/s390/util/dwarf-regs.c +1 -1
@@ -6,7 +6,7 @@* */ -#include <libio.h> +#include <stddef.h> #include <dwarf-regs.h> #define NUM_GPRS 16
tools/perf/arch/sh/util/dwarf-regs.c +1 -1
@@ -19,7 +19,7 @@* */ -#include <libio.h> +#include <stddef.h> #include <dwarf-regs.h> /*
tools/perf/arch/sparc/util/dwarf-regs.c +1 -1
@@ -9,7 +9,7 @@* 2 of the License, or (at your option) any later version. */ -#include <libio.h> +#include <stddef.h> #include <dwarf-regs.h> #define SPARC_MAX_REGS 96
tools/perf/arch/x86/util/dwarf-regs.c +1 -1
@@ -20,7 +20,7 @@* */ -#include <libio.h> +#include <stddef.h> #include <dwarf-regs.h> /*
Signature · 1 line
1.8.1.5
tip-bot for Cody P Schafer
merge bot[tip:perf/core] perf tools: Fix build on non-glibc systems due to libio.h absence
perf tools: Fix build on non-glibc systems due to libio.h absence
Commit-ID: 861e10be08c69808065d755d3e3cab5d520a2d32 Gitweb: http://git.kernel.org/tip/861e10be08c69808065d755d3e3cab5d520a2d32 Author: Cody P Schafer <[email protected]> AuthorDate: Thu, 14 Mar 2013 15:27:51 -0700 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Fri, 15 Mar 2013 13:05:13 -0300
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).
--- tools/perf/arch/arm/util/dwarf-regs.c | 5 +---- tools/perf/arch/powerpc/util/dwarf-regs.c | 5 +---- tools/perf/arch/s390/util/dwarf-regs.c | 2 +- tools/perf/arch/sh/util/dwarf-regs.c | 2 +- tools/perf/arch/sparc/util/dwarf-regs.c | 2 +- tools/perf/arch/x86/util/dwarf-regs.c | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-)
tools/perf/arch/arm/util/dwarf-regs.c +1 -4
@@ -8,10 +8,7 @@* published by the Free Software Foundation. */ -#include <stdlib.h> -#ifndef __UCLIBC__ -#include <libio.h> -#endif +#include <stddef.h> #include <dwarf-regs.h> struct pt_regs_dwarfnum {
tools/perf/arch/powerpc/util/dwarf-regs.c +1 -4
@@ -9,10 +9,7 @@* 2 of the License, or (at your option) any later version. */ -#include <stdlib.h> -#ifndef __UCLIBC__ -#include <libio.h> -#endif +#include <stddef.h> #include <dwarf-regs.h>
tools/perf/arch/s390/util/dwarf-regs.c +1 -1
@@ -6,7 +6,7 @@* */ -#include <libio.h> +#include <stddef.h> #include <dwarf-regs.h> #define NUM_GPRS 16
tools/perf/arch/sh/util/dwarf-regs.c +1 -1
@@ -19,7 +19,7 @@* */ -#include <libio.h> +#include <stddef.h> #include <dwarf-regs.h> /*
tools/perf/arch/sparc/util/dwarf-regs.c +1 -1
@@ -9,7 +9,7 @@* 2 of the License, or (at your option) any later version. */ -#include <libio.h> +#include <stddef.h> #include <dwarf-regs.h> #define SPARC_MAX_REGS 96
tools/perf/arch/x86/util/dwarf-regs.c +1 -1
@@ -20,7 +20,7 @@* */ -#include <libio.h> +#include <stddef.h> #include <dwarf-regs.h> /*