summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/0001-compiler.h-Undef-before-redefining-__attribute_const.patch
blob: 597fd3b42eeb419c065bc2e0ee3a39eac8c73938 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 6f92ab6de9d8daeb575949bbbcbc7bcdcebc60af Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem at gmail.com>
Date: Thu, 5 Jan 2012 11:42:35 -0800
Subject: [PATCH] compiler.h: Undef before redefining __attribute_const__

This is required to avoid warnings like
util/include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror]

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 tools/perf/util/include/linux/compiler.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

--- a/tools/perf/util/include/linux/compiler.h
+++ b/tools/perf/util/include/linux/compiler.h
@@ -4,9 +4,11 @@
 #ifndef __always_inline
 #define __always_inline	inline
 #endif
+#undef __user
 #define __user
+#undef __attribute_const__
 #define __attribute_const__
-
+#undef __used
 #define __used		__attribute__((__unused__))
 
 #endif