[U-Boot] [PATCH] Use sizeof(gd_t), not sizeof(struct global_data)
Loïc Minier
loic.minier at linaro.org
Mon Jan 3 16:47:32 CET 2011
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 at gmail.com>
Signed-off-by: Loïc Minier <loic.minier at 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
More information about the U-Boot
mailing list