diff options
author | Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> | 2013-04-26 13:17:56 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-05-28 09:23:57 -0400 |
commit | b3539d214f6000217aae97b5ae32df5b03faf850 (patch) | |
tree | d1c75b2fcec08f819cf54d282972624f987c2559 | |
parent | f9619d693a3aad365598ed5f718bd5883c7cb7f8 (diff) |
perf tests: Fix compile errors in bp_signal files
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>
-rw-r--r-- | tools/perf/tests/bp_signal.c | 6 | ||||
-rw-r--r-- | tools/perf/tests/bp_signal_overflow.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c index 68daa289e94c..aba095489193 100644 --- a/tools/perf/tests/bp_signal.c +++ b/tools/perf/tests/bp_signal.c | |||
@@ -4,6 +4,12 @@ | |||
4 | * (git://github.com/deater/perf_event_tests) | 4 | * (git://github.com/deater/perf_event_tests) |
5 | */ | 5 | */ |
6 | 6 | ||
7 | /* | ||
8 | * Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select | ||
9 | * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu. | ||
10 | */ | ||
11 | #define __SANE_USERSPACE_TYPES__ | ||
12 | |||
7 | #include <stdlib.h> | 13 | #include <stdlib.h> |
8 | #include <stdio.h> | 14 | #include <stdio.h> |
9 | #include <unistd.h> | 15 | #include <unistd.h> |
diff --git a/tools/perf/tests/bp_signal_overflow.c b/tools/perf/tests/bp_signal_overflow.c index fe7ed28815f8..44ac82179708 100644 --- a/tools/perf/tests/bp_signal_overflow.c +++ b/tools/perf/tests/bp_signal_overflow.c | |||
@@ -3,6 +3,12 @@ | |||
3 | * perf_event_tests (git://github.com/deater/perf_event_tests) | 3 | * perf_event_tests (git://github.com/deater/perf_event_tests) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | /* | ||
7 | * Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select | ||
8 | * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu. | ||
9 | */ | ||
10 | #define __SANE_USERSPACE_TYPES__ | ||
11 | |||
6 | #include <stdlib.h> | 12 | #include <stdlib.h> |
7 | #include <stdio.h> | 13 | #include <stdio.h> |
8 | #include <unistd.h> | 14 | #include <unistd.h> |