From 7b39cafb7aa68ef8e32a9f51fbe737d96084ca74 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 13 Jul 2016 09:37:43 +0200 Subject: [PATCH] tools: Work around BITS_PER_LONG related build failure in objtool The objtool build fails with the recent changes to the bits-per-long headers: tools/include/linux/bitops.h:12:0: error: "BITS_PER_LONG" redefined [-Werror] Which got introduced by: bb9707077b4e tools: Copy the bitsperlong.h files from the kernel Work it around for the time being. Cc: Arnaldo Carvalho de Melo Cc: Josh Poimboeuf Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- tools/include/linux/bitops.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/include/linux/bitops.h b/tools/include/linux/bitops.h index 5ad9ee1dd7f6..49c929a104ee 100644 --- a/tools/include/linux/bitops.h +++ b/tools/include/linux/bitops.h @@ -9,7 +9,9 @@ #define __WORDSIZE (__SIZEOF_LONG__ * 8) #endif -#define BITS_PER_LONG __WORDSIZE +#ifndef BITS_PER_LONG +# define BITS_PER_LONG __WORDSIZE +#endif #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG)) #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) -- 2.20.1