]> code.ossystems Code Review - meta-freescale.git/blob
bf2f6e7717284f6bdd19c8c9f8f15356bb361e02
[meta-freescale.git] /
1 From 6f92ab6de9d8daeb575949bbbcbc7bcdcebc60af Mon Sep 17 00:00:00 2001
2 From: Khem Raj <raj.khem@gmail.com>
3 Date: Thu, 5 Jan 2012 11:42:35 -0800
4 Subject: [PATCH] compiler.h: Undef before redefining __attribute_const__
5
6 This is required to avoid warnings like
7 util/include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror]
8
9 Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11 Upstream-Status: Pending
12
13 ---
14  tools/perf/util/include/linux/compiler.h |    4 +++-
15  1 files changed, 3 insertions(+), 1 deletions(-)
16
17 --- a/tools/perf/util/include/linux/compiler.h
18 +++ b/tools/perf/util/include/linux/compiler.h
19 @@ -4,9 +4,11 @@
20  #ifndef __always_inline
21  #define __always_inline        inline
22  #endif
23 +#undef __user
24  #define __user
25 +#undef __attribute_const__
26  #define __attribute_const__
27 -
28 +#undef __used
29  #define __used         __attribute__((__unused__))
30  
31  #endif