Re: [U-Boot] [PATCH v8 2/4] net: use common rand()/srand() functions
On Mon, 4 Jun 2012 15:10:55 -0500 Joe Hershberger joe.hershber...@gmail.com wrote: On Fri, Jun 1, 2012 at 3:39 PM, Michael Walle mich...@walle.cc wrote: Replace rand() with the functions from lib/. The link-local network code stores its own seed, derived from the MAC address. Thus making it independent from calls to srand() in other modules. Signed-off-by: Michael Walle mich...@walle.cc Cc: Joe Hershberger joe.hershber...@ni.com --- Acked-by: Joe Hershberger joe.hershber...@ni.com build-testing mpc83xx on the current u-boot-arm tree (v1.3.4-10940-gb003588, which contains this patch) produces the following new warning: $ ./MAKEALL MPC8313ERDB_66 Configuring for MPC8313ERDB_66 - Board: MPC8313ERDB, Options: SYS_66MHZ textdata bss dec hex filename 271988 13976 41768 327732 50034 ./u-boot In file included from bootp.c:15:0: net_rand.h: In function 'srand_mac': net_rand.h:40:2: warning: implicit declaration of function 'srand' [-Wimplicit-function-declaration] How do we fix this? Kim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v8 2/4] net: use common rand()/srand() functions
Am Donnerstag 05 Juli 2012, 20:18:12 schrieb Kim Phillips: On Mon, 4 Jun 2012 15:10:55 -0500 Joe Hershberger joe.hershber...@gmail.com wrote: On Fri, Jun 1, 2012 at 3:39 PM, Michael Walle mich...@walle.cc wrote: Replace rand() with the functions from lib/. The link-local network code stores its own seed, derived from the MAC address. Thus making it independent from calls to srand() in other modules. Signed-off-by: Michael Walle mich...@walle.cc Cc: Joe Hershberger joe.hershber...@ni.com --- Acked-by: Joe Hershberger joe.hershber...@ni.com build-testing mpc83xx on the current u-boot-arm tree (v1.3.4-10940-gb003588, which contains this patch) produces the following new warning: $ ./MAKEALL MPC8313ERDB_66 Configuring for MPC8313ERDB_66 - Board: MPC8313ERDB, Options: SYS_66MHZ text data bss dec hex filename 271988 13976 41768 327732 50034 ./u-boot In file included from bootp.c:15:0: net_rand.h: In function 'srand_mac': net_rand.h:40:2: warning: implicit declaration of function 'srand' [-Wimplicit-function-declaration] How do we fix this? sth like that for example? diff --git a/net/bootp.c b/net/bootp.c index 0f0867b..87e30ab 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -12,12 +12,14 @@ #include command.h #include net.h #include bootp.h -#include net_rand.h #include tftp.h #include nfs.h #ifdef CONFIG_STATUS_LED #include status_led.h #endif +#ifdef CONFIG_BOOTP_RANDOM_DELAY +#include net_rand.h +#endif -- Michael ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v8 2/4] net: use common rand()/srand() functions
Hi Michael, On Fri, Jun 1, 2012 at 3:39 PM, Michael Walle mich...@walle.cc wrote: Replace rand() with the functions from lib/. The link-local network code stores its own seed, derived from the MAC address. Thus making it independent from calls to srand() in other modules. Signed-off-by: Michael Walle mich...@walle.cc Cc: Joe Hershberger joe.hershber...@ni.com --- Acked-by: Joe Hershberger joe.hershber...@ni.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot