Skip to content

Commit 861e10b

Browse files
codypsacmel
authored andcommitted
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 <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent d1398cc commit 861e10b

File tree

6 files changed

+6
-12
lines changed

6 files changed

+6
-12
lines changed

tools/perf/arch/arm/util/dwarf-regs.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
* published by the Free Software Foundation.
99
*/
1010

11-
#include <stdlib.h>
12-
#ifndef __UCLIBC__
13-
#include <libio.h>
14-
#endif
11+
#include <stddef.h>
1512
#include <dwarf-regs.h>
1613

1714
struct pt_regs_dwarfnum {

tools/perf/arch/powerpc/util/dwarf-regs.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
* 2 of the License, or (at your option) any later version.
1010
*/
1111

12-
#include <stdlib.h>
13-
#ifndef __UCLIBC__
14-
#include <libio.h>
15-
#endif
12+
#include <stddef.h>
1613
#include <dwarf-regs.h>
1714

1815

tools/perf/arch/s390/util/dwarf-regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*/
88

9-
#include <libio.h>
9+
#include <stddef.h>
1010
#include <dwarf-regs.h>
1111

1212
#define NUM_GPRS 16

tools/perf/arch/sh/util/dwarf-regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
*/
2121

22-
#include <libio.h>
22+
#include <stddef.h>
2323
#include <dwarf-regs.h>
2424

2525
/*

tools/perf/arch/sparc/util/dwarf-regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* 2 of the License, or (at your option) any later version.
1010
*/
1111

12-
#include <libio.h>
12+
#include <stddef.h>
1313
#include <dwarf-regs.h>
1414

1515
#define SPARC_MAX_REGS 96

tools/perf/arch/x86/util/dwarf-regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
*/
2222

23-
#include <libio.h>
23+
#include <stddef.h>
2424
#include <dwarf-regs.h>
2525

2626
/*

0 commit comments

Comments
 (0)