Re: [PATCH 05/13] perf tools: fix ALIGN redefinition in system headers

From: David Ahern
Date: Wed Aug 29 2012 - 12:24:43 EST


On 8/28/12 4:02 PM, Irina Tirdea wrote:
On some systems (e.g. Android), ALIGN is defined in
system headers as ALIGN(p). The definition of ALIGN used
in perf takes 2 parameters: ALIGN(x,a). This leads to
redefinition conflicts.

Redefinition error on Android:
In file included from util/include/linux/list.h:1:0,
from util/callchain.h:5,
from util/hist.h:6,
from util/session.h:4,
from util/build-id.h:4,
from util/annotate.c:11:
util/include/linux/kernel.h:11:0: error: "ALIGN" redefined [-Werror]
bionic/libc/include/sys/param.h:38:0: note: this is the location of
the previous definition


Simpler to undef ALIGN in util/include/linux/kernel.h right before the perf version is declared.

David

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/