public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Use sizeof(gd_t), not sizeof(struct global_data)
@ 2011-01-03 15:47 Loïc Minier
  2011-01-03 16:35 ` Mike Frysinger
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Loïc Minier @ 2011-01-03 15:47 UTC (permalink / raw)
  To: u-boot

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.

Cc: Graeme Russ <graeme.russ@gmail.com>
Signed-off-by: Lo?c Minier <loic.minier@linaro.org>
---
 lib/asm-offsets.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
index 2209561..6a4084e 100644
--- a/lib/asm-offsets.c
+++ b/lib/asm-offsets.c
@@ -23,7 +23,7 @@ int main(void)
 {
 	/* Round up to make sure size gives nice stack alignment */
 	DEFINE(GENERATED_GBL_DATA_SIZE,
-		(sizeof(struct global_data)+15) & ~15);
+		(sizeof(gd_t)+15) & ~15);
 
 	return 0;
 }
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-03 17:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-03 15:47 [U-Boot] [PATCH] Use sizeof(gd_t), not sizeof(struct global_data) Loïc Minier
2011-01-03 16:35 ` Mike Frysinger
2011-01-03 17:00   ` Loïc Minier
2011-01-03 16:51 ` Wolfgang Denk
2011-01-03 17:03   ` Loïc Minier
2011-01-03 17:00 ` [U-Boot] [PATCH 2/2] i386: Define struct global_data as on other arches Loïc Minier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox