summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch')
-rw-r--r--recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch b/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch
new file mode 100644
index 0000000..597fd3b
--- /dev/null
+++ b/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch
@@ -0,0 +1,28 @@
1From 6f92ab6de9d8daeb575949bbbcbc7bcdcebc60af Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem at gmail.com>
3Date: Thu, 5 Jan 2012 11:42:35 -0800
4Subject: [PATCH] compiler.h: Undef before redefining __attribute_const__
5
6This is required to avoid warnings like
7util/include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror]
8
9Signed-off-by: Khem Raj <raj.khem at gmail.com>
10---
11 tools/perf/util/include/linux/compiler.h | 4 +++-
12 1 files changed, 3 insertions(+), 1 deletions(-)
13
14--- a/tools/perf/util/include/linux/compiler.h
15+++ b/tools/perf/util/include/linux/compiler.h
16@@ -4,9 +4,11 @@
17 #ifndef __always_inline
18 #define __always_inline inline
19 #endif
20+#undef __user
21 #define __user
22+#undef __attribute_const__
23 #define __attribute_const__
24-
25+#undef __used
26 #define __used __attribute__((__unused__))
27
28 #endif