1 From 5b23525591c28bb85aed56dea51be68b87bf969d Mon Sep 17 00:00:00 2001
2 From: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
3 Date: Fri, 10 Oct 2008 10:29:46 -0300
4 Subject: [PATCH] NCC: stddef.h: undef __compiler_offsetof
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
9 The of __compiler_offsetof generates the following error:
12 ncc: output file is [
\e[01;37ma.out.nccout
\e[0m]
14 ncc: output file is [
\e[01;37ma.out.nccout
\e[0m]
16 ncc: output file is [
\e[01;37ma.out.nccout
\e[0m]
18 ncc: output file is [
\e[01;37march/x86/kernel/asm-offsets.s.nccout
\e[0m]
19 Opening preprocessed file arch/x86/kernel/asm-offsets.i
20 ncc-error : missing ')'
21 /home/lcapitulino/src/kernels/upstream/linux-2.6-ncc/include/asm/desc.h (176): syntax error:"d = get_cpu_gdt_table ( cpu ) ; tss_desc tss ; set_tssldt_descriptor ( & tss , ( unsigned long ) addr , DESC_TSS , __builtin_offsetof ( struct tss_struct , io_bitmap ) + ( 65536 / 8 ) + sizeof ( unsigned long ) - 1 ) ; native_write_gdt_entry ( d , "
22 make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
23 make: *** [prepare0] Error 2
26 Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
28 include/linux/stddef.h | 3 +++
29 1 files changed, 3 insertions(+), 0 deletions(-)
31 diff --git a/include/linux/stddef.h b/include/linux/stddef.h
32 index 6a40c76..dc532b9 100644
33 --- a/include/linux/stddef.h
34 +++ b/include/linux/stddef.h
35 @@ -18,6 +18,9 @@ enum {
40 +#undef __compiler_offsetof
42 #ifdef __compiler_offsetof
43 #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)