From: Sukadev Bhattiprolu Date: Thu, 24 Jan 2013 05:44:39 +0000 (-0800) Subject: perf tools, powerpc: Fix compile warnings in tests/attr.c X-Git-Tag: MMI-PSA29.97-13-9~15047^2~12^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e3541ec75219819d3235f80125a1a75d798ff6e1;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git perf tools, powerpc: Fix compile warnings in tests/attr.c We print several '__u64' quantities using '%llu'. On powerpc, we by default include ' which results in __u64 being an unsigned long. This causes compile warnings which are treated as errors due to '-Werror'. By defining __SANE_USERSPACE_TYPES__ we include and define __u64 as unsigned long long. Changelog[v2]: [Michael Ellerman] Use __SANE_USERSPACE_TYPES__ and avoid PRIu64 format specifier - which as Jiri Olsa pointed out, breaks on x86-64. Signed-off-by: Sukadev Bhattiprolu Cc: Anton Blanchard Cc: Jiri Olsa Cc: Michael Ellerman Cc: linuxppc-dev@ozlabs.org Link: http://lkml.kernel.org/r/20130124054439.GA31588@us.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c index f61dd3fb546b..bdcceb886f77 100644 --- a/tools/perf/tests/attr.c +++ b/tools/perf/tests/attr.c @@ -19,6 +19,11 @@ * permissions. All the event text files are stored there. */ +/* + * Powerpc needs __SANE_USERSPACE_TYPES__ before to select + * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu. + */ +#define __SANE_USERSPACE_TYPES__ #include #include #include