Skip to content

Commit

Permalink
perf tests: Fix compile errors in bp_signal files
Browse files Browse the repository at this point in the history
When building on powerpc,  we get compile errors in bp_signal.c and
bp_signal_overflow.c due to __u64 and '%llx'.

Powerpc, needs __SANE_USERSPACE_TYPES__ to be defined so we pick up
<asm-generic/int-ll64.h> and define __u64 as unsigned long long.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20130426173320.GA7029@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Sukadev Bhattiprolu authored and Arnaldo Carvalho de Melo committed May 28, 2013
1 parent f9619d6 commit b3539d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/perf/tests/bp_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
* (git://github.com/deater/perf_event_tests)
*/

/*
* Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select
* 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu.
*/
#define __SANE_USERSPACE_TYPES__

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
Expand Down
6 changes: 6 additions & 0 deletions tools/perf/tests/bp_signal_overflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
* perf_event_tests (git://github.com/deater/perf_event_tests)
*/

/*
* Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select
* 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu.
*/
#define __SANE_USERSPACE_TYPES__

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
Expand Down

0 comments on commit b3539d2

Please sign in to comment.