perf tests: Fix compile errors in bp_signal files
authorSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Fri, 26 Apr 2013 17:17:56 +0000 (10:17 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 28 May 2013 13:23:57 +0000 (16:23 +0300)
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>
tools/perf/tests/bp_signal.c
tools/perf/tests/bp_signal_overflow.c

index 68daa28..aba0954 100644 (file)
@@ -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>
index fe7ed28..44ac821 100644 (file)
@@ -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>