Remove classmate debug patch
[lcapit-linux-patches.git] / 2.6.27-ncc / 0006-NCC-compiler-gcc.h-Do-not-use-__must_be_array-macr.patch
blob89efa8d0afebc00016a4e3723e77c267d95a1bc7
1 From 5e4bf13db6f7f922be589436d57ec31548d7f538 Mon Sep 17 00:00:00 2001
2 From: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
3 Date: Fri, 10 Oct 2008 10:56:07 -0300
4 Subject: [PATCH] NCC: compiler-gcc.h: Do not use __must_be_array macro
6 Otherwise ncc will fail with the following error:
8 """
9 /home/lcapitulino/src/kernels/upstream/linux-2.6-ncc/arch/x86/kernel/setup.c (412): syntax error:"( ( e820 . map ) [ 0 ] ) + ( sizeof ( char [ 1 - 2 * ! ! ( __builtin_types_compatible_p ( __typeof__ ( e820 . map ) , __typeof__ ( & e820 . map [ 0 ] ) ) ) ] ) - 1 ) ) "
10 make[1]: *** [arch/x86/kernel/setup.o] Error 1
11 make: *** [arch/x86/kernel] Error 2
12 """
14 Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
15 ---
16 include/linux/compiler-gcc.h | 4 ++++
17 1 files changed, 4 insertions(+), 0 deletions(-)
19 diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
20 index 83a3d4c..46a9f84 100644
21 --- a/include/linux/compiler-gcc.h
22 +++ b/include/linux/compiler-gcc.h
23 @@ -25,8 +25,12 @@
24 (typeof(ptr)) (__ptr + (off)); })
26 /* &a[0] degrades to a pointer: a different type from an array */
27 +#ifdef __NCC__
28 +#define __must_be_array(a) 0
29 +#else
30 #define __must_be_array(a) \
31 BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
32 +#endif
35 * Force always-inline if the user requests it so via the .config,
36 --
37 1.5.6