[U-Boot] [PATCH] Use sizeof(gd_t), not sizeof(struct global_data)
Wolfgang Denk
wd at denx.de
Mon Jan 3 17:51:46 CET 2011
Dear =?UTF-8?q?Lo=C3=AFc=20Minier?=,
In message <1294069652-9114-1-git-send-email-loic.minier at linaro.org> you wrote:
> The eNET (x86) build fails with "invalid application of 'sizeof' to
> incomplete type 'struct global_data'" because x86 doesn't define
> struct global_data. Change sizeof(struct global_data) to sizeof(gd_t)
> which is always available.
Um... I do not like this change; the resulting code is harder to read.
Can you please change the struct declaration isntead, like this:
diff --git a/arch/i386/include/asm/global_data.h b/arch/i386/include/asm/global_data.h
index e3f8a25..e9000c3 100644
--- a/arch/i386/include/asm/global_data.h
+++ b/arch/i386/include/asm/global_data.h
@@ -35,7 +35,7 @@
#ifndef __ASSEMBLY__
-typedef struct {
+typedef struct global_data {
bd_t *bd;
unsigned long flags;
unsigned long baudrate;
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Athens built the Acropolis. Corinth was a commercial city,
interested in purely materialistic things. Today we admire Athens,
visit it, preserve the old temples, yet we hardly ever set foot in
Corinth." - Dr. Harold Urey, Nobel Laureate in chemistry
More information about the U-Boot
mailing list