From: Kim Phillips Date: Thu, 5 Jul 2012 18:19:32 -0500 Subject: [U-Boot] [PATCH] net: make net_rand.h inclusion depend on BOOTP_RANDOM_DELAY In-Reply-To: <201207052337.44092.michael@walle.cc> References: <1338583180-422-1-git-send-email-michael@walle.cc> <20120705131812.7dc0668c4c0fab08884e6198@freescale.com> <201207052337.44092.michael@walle.cc> Message-ID: <20120705181932.351bb5e527cb14b435961d66@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de commit "net: use common rand()/srand() functions" introduced the following build warning on the current u-boot-arm tree: $ ./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] adding this dependency fixes it. Cc: Michael Walle Cc: Joe Hershberger Signed-off-by: Kim Phillips --- net/bootp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 #include #include "bootp.h" -#include "net_rand.h" #include "tftp.h" #include "nfs.h" #ifdef CONFIG_STATUS_LED #include #endif +#ifdef CONFIG_BOOTP_RANDOM_DELAY +#include "net_rand.h" +#endif #define BOOTP_VENDOR_MAGIC 0x63825363 /* RFC1048 Magic Cookie */ -- 1.7.11.1