]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
smc91111_eeprom: fix linking error
authorMike Frysinger <vapier@gentoo.org>
Thu, 21 Jan 2010 10:04:59 +0000 (05:04 -0500)
committerBen Warren <biggerbadderben@gmail.com>
Mon, 1 Feb 2010 06:34:33 +0000 (22:34 -0800)
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>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
examples/standalone/smc91111_eeprom.c

index 9145763e30ce3319e47573d00c6df42e7ce518a2..b91f34c3af0593095d262c84e8345ca9af6e925a 100644 (file)
@@ -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);