From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] smc91111_eeprom: fix linking error
Date: Thu, 21 Jan 2010 13:27:55 -0800 [thread overview]
Message-ID: <4B58C6DB.4090808@gmail.com> (raw)
In-Reply-To: <1264068299-4615-1-git-send-email-vapier@gentoo.org>
Mike,
Mike Frysinger wrote:
> Building for a bf533-stamp ends up with this error:
> smc91111_eeprom.o: In function `smc91111_eeprom':
> examples/standalone/smc91111_eeprom.c:58: undefined reference to `memset'
> make[2]: *** [smc91111_eeprom] Error 1
>
> The new eth_struct definition means gcc has to zero out the structure on
> the stack, and some gcc versions optimize this with an implicit call to
> memset. So tweak the structure style to avoid that gcc feature.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> examples/standalone/smc91111_eeprom.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/examples/standalone/smc91111_eeprom.c b/examples/standalone/smc91111_eeprom.c
> index 9145763..b91f34c 100644
> --- a/examples/standalone/smc91111_eeprom.c
> +++ b/examples/standalone/smc91111_eeprom.c
> @@ -53,9 +53,8 @@ int smc91111_eeprom (int argc, char *argv[])
> int c, i, j, done, line, reg, value, start, what;
> char input[50];
>
> - struct eth_device dev = {
> - .iobase = CONFIG_SMC91111_BASE
> - };
> + struct eth_device dev;
> + dev.iobase = CONFIG_SMC91111_BASE;
>
> /* Print the ABI version */
> app_startup (argv);
>
Applied to net repo.
thanks,
Ben
prev parent reply other threads:[~2010-01-21 21:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-21 10:04 [U-Boot] [PATCH] smc91111_eeprom: fix linking error Mike Frysinger
2010-01-21 21:27 ` Ben Warren [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B58C6DB.4090808@gmail.com \
--to=biggerbadderben@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox