perf tools: Fix compilation on powerpc
authorPaul Mackerras <paulus@samba.org>
Tue, 24 Nov 2009 04:19:43 +0000 (15:19 +1100)
committerIngo Molnar <mingo@elte.hu>
Tue, 24 Nov 2009 07:35:10 +0000 (08:35 +0100)
commitee3d250446f1c1be4eceab48f3a23794d9a6564c
tree9bac8d65f5c29cb390069c75a3c3600563ae1f1a
parentfa7c27ee9394fc0d52404b2a89882e95868a60b9
perf tools: Fix compilation on powerpc

Currently, perf fails to compile on powerpc with this error:

     CC util/header.o
 In file included from util/../perf.h:17,
                  from util/header.c:9:
 util/../../../arch/powerpc/include/asm/unistd.h:360:27: error:
 linux/linkage.h: No such file or directory make: ***
 [util/header.o] Error 1

The reason is that we still have a #define __KERNEL__ in effect
at the point where <asm/unistd.h> gets included, which means we
get extra stuff that we don't need or want.

This fixes the problem by undefining __KERNEL__ once we have
included the file for which we need __KERNEL__ defined.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <19211.24287.453183.78836@cargo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/util/include/linux/bitops.h