Skip to content

Commit

Permalink
perf tools: Fix build on non-glibc systems due to libio.h absence
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cody P Schafer authored and Arnaldo Carvalho de Melo committed Mar 15, 2013
1 parent d1398cc commit 861e10b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
5 changes: 1 addition & 4 deletions tools/perf/arch/arm/util/dwarf-regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 1 addition & 4 deletions tools/perf/arch/powerpc/util/dwarf-regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>


Expand Down
2 changes: 1 addition & 1 deletion tools/perf/arch/s390/util/dwarf-regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
*/

#include <libio.h>
#include <stddef.h>
#include <dwarf-regs.h>

#define NUM_GPRS 16
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/arch/sh/util/dwarf-regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
*/

#include <libio.h>
#include <stddef.h>
#include <dwarf-regs.h>

/*
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/arch/sparc/util/dwarf-regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/arch/x86/util/dwarf-regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
*/

#include <libio.h>
#include <stddef.h>
#include <dwarf-regs.h>

/*
Expand Down

0 comments on commit 861e10b

Please sign in to comment.