From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Paul Mackerras <paulus@samba.org>
Subject: [PATCH] perf tools: Prevent from BITS_PER_LONG redefinition
Date: Fri, 18 Dec 2009 23:05:20 +0100 [thread overview]
Message-ID: <1261173920-11320-1-git-send-regression-fweisbec@gmail.com> (raw)
The system asm/types.h may have defined BITS_PER_LONG already,
depending on the distro.
Check that before defining it from bitops.h wrapper.
Fixes:
In file included from util/include/../../../../include/linux/bitops.h:17,
from util/include/linux/bitops.h:8,
from ../../lib/hweight.c:2:
util/include/asm/bitops.h:9:1: error: "BITS_PER_LONG" redefined
In file included from util/include/../../../../include/linux/bitops.h:3,
from util/include/linux/bitops.h:8,
from ../../lib/hweight.c:2:
/usr/include/asm/types.h:32:1: error: this is the location of the previous definition
make: *** [util/hweight.o] Erreur 1
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
---
tools/perf/util/include/asm/bitops.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tools/perf/util/include/asm/bitops.h b/tools/perf/util/include/asm/bitops.h
index 58e9817..d945334 100644
--- a/tools/perf/util/include/asm/bitops.h
+++ b/tools/perf/util/include/asm/bitops.h
@@ -5,8 +5,10 @@
#include "../../types.h"
#include <linux/compiler.h>
+#ifndef BITS_PER_LONG
/* CHECKME: Not sure both always match */
#define BITS_PER_LONG __WORDSIZE
+#endif
#include "../../../../include/asm-generic/bitops/__fls.h"
#include "../../../../include/asm-generic/bitops/fls.h"
--
1.6.2.3
next reply other threads:[~2009-12-18 22:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-18 22:05 Frederic Weisbecker [this message]
2009-12-19 9:26 ` Peter Zijlstra
2009-12-19 14:34 ` Frederic Weisbecker
2009-12-20 5:11 ` Jeremy Fitzhardinge
2009-12-30 21:45 ` Frederic Weisbecker
2009-12-31 11:09 ` Jeremy Fitzhardinge
2010-01-02 17:01 ` Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1261173920-11320-1-git-send-regression-fweisbec@gmail.com \
--to=fweisbec@gmail.com \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®