From: Ingo Molnar Date: Wed, 13 Jul 2016 07:37:43 +0000 (+0200) Subject: tools: Work around BITS_PER_LONG related build failure in objtool X-Git-Tag: MMI-PSA29.97-13-9~7534^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7b39cafb7aa68ef8e32a9f51fbe737d96084ca74;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 --- 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)