tools/perf: don't include libio.h in arch's dwarf-regs.c
PATCH 1/1 tools/perf: don't include libio.h in arch's dwarf-regs.c
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).
Build tested on powerpc and x86.
Signed-off-by Cody P Schafer <[email protected]>
--- 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 +- 5 files changed, 5 insertions(+), 8 deletions(-)
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.1