* [PATCH][2.6.11] gcc4 fix for <asm-m68k/setup.h>
@ 2005-03-03 16:17 Mikael Pettersson
2005-03-03 23:40 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Mikael Pettersson @ 2005-03-03 16:17 UTC (permalink / raw)
To: paulus, geert; +Cc: linuxppc-dev, linux-m68k, linux-kernel
gcc4 generates compile errors when it sees declarations
of arrays of incomplete element types. <asm-m68k/setup.h>
has one such declaration, which unfortunately breaks ppc32
since <asm-ppc/setup.h> #includes <asm-m68k/setup.h>.
The fix in this case is to simply move the array declaration
to after the corresponding element type declaration.
Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>
diff -rupN linux-2.6.11/include/asm-m68k/setup.h linux-2.6.11.gcc4-fixes-v2/include/asm-m68k/setup.h
--- linux-2.6.11/include/asm-m68k/setup.h 2004-12-25 12:16:22.000000000 +0100
+++ linux-2.6.11.gcc4-fixes-v2/include/asm-m68k/setup.h 2005-03-02 19:36:26.000000000 +0100
@@ -362,12 +362,13 @@ extern int m68k_is040or060;
#ifndef __ASSEMBLY__
extern int m68k_num_memory; /* # of memory blocks found (and used) */
extern int m68k_realnum_memory; /* real # of memory blocks found */
-extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
struct mem_info {
unsigned long addr; /* physical address of memory chunk */
unsigned long size; /* length of memory chunk (in bytes) */
};
+
+extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
#endif
#endif /* __KERNEL__ */
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH][2.6.11] gcc4 fix for <asm-m68k/setup.h>
2005-03-03 16:17 [PATCH][2.6.11] gcc4 fix for <asm-m68k/setup.h> Mikael Pettersson
@ 2005-03-03 23:40 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2005-03-03 23:40 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: geert, linux-m68k, paulus, linux-kernel, linuxppc-dev
Mikael Pettersson <mikpe@user.it.uu.se> wrote:
>
> gcc4 generates compile errors when it sees declarations
> of arrays of incomplete element types. <asm-m68k/setup.h>
> has one such declaration, which unfortunately breaks ppc32
> since <asm-ppc/setup.h> #includes <asm-m68k/setup.h>.
>
> The fix in this case is to simply move the array declaration
> to after the corresponding element type declaration.
>
> Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>
Thanks, I'll merge that up.
> diff -rupN linux-2.6.11/include/asm-m68k/setup.h linux-2.6.11.gcc4-fixes-v2/include/asm-m68k/setup.h
> --- linux-2.6.11/include/asm-m68k/setup.h 2004-12-25 12:16:22.000000000 +0100
> +++ linux-2.6.11.gcc4-fixes-v2/include/asm-m68k/setup.h 2005-03-02 19:36:26.000000000 +0100
> @@ -362,12 +362,13 @@ extern int m68k_is040or060;
> #ifndef __ASSEMBLY__
> extern int m68k_num_memory; /* # of memory blocks found (and used) */
> extern int m68k_realnum_memory; /* real # of memory blocks found */
> -extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
>
> struct mem_info {
> unsigned long addr; /* physical address of memory chunk */
> unsigned long size; /* length of memory chunk (in bytes) */
> };
> +
> +extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
> #endif
>
> #endif /* __KERNEL__ */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-03 23:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-03 16:17 [PATCH][2.6.11] gcc4 fix for <asm-m68k/setup.h> Mikael Pettersson
2005-03-03 23:40 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox