From patchwork Thu Jul 5 21:37:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 169279 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 76DA02C0079 for ; Fri, 6 Jul 2012 07:37:51 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 336DB281A3; Thu, 5 Jul 2012 23:37:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qYGlow+sCmMP; Thu, 5 Jul 2012 23:37:50 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5034C281B1; Thu, 5 Jul 2012 23:37:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1A3C3281B1 for ; Thu, 5 Jul 2012 23:37:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 561J4UjdXRhk for ; Thu, 5 Jul 2012 23:37:45 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.serverraum.org (mail.serverraum.org [78.47.150.89]) by theia.denx.de (Postfix) with ESMTP id 721D4281A3 for ; Thu, 5 Jul 2012 23:37:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.serverraum.org (Postfix) with ESMTP id C33A43EFFB; Thu, 5 Jul 2012 23:37:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.serverraum.org Received: from mail.serverraum.org ([127.0.0.1]) by localhost (web.serverraum.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eKpDO+ltxvXz; Thu, 5 Jul 2012 23:37:43 +0200 (CEST) Received: from thanatos.localnet (95-89-251-205-dynip.superkabel.de [95.89.251.205]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.serverraum.org (Postfix) with ESMTPSA id 8B9FF3EFEF; Thu, 5 Jul 2012 23:37:43 +0200 (CEST) From: Michael Walle To: Kim Phillips Date: Thu, 5 Jul 2012 23:37:43 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.32-5-686-bigmem; KDE/4.4.5; i686; ; ) References: <1338583180-422-1-git-send-email-michael@walle.cc> <20120705131812.7dc0668c4c0fab08884e6198@freescale.com> In-Reply-To: <20120705131812.7dc0668c4c0fab08884e6198@freescale.com> MIME-Version: 1.0 Message-Id: <201207052337.44092.michael@walle.cc> Cc: Joe Hershberger , u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH v8 2/4] net: use common rand()/srand() functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Am Donnerstag 05 Juli 2012, 20:18:12 schrieb Kim Phillips: > On Mon, 4 Jun 2012 15:10:55 -0500 > > Joe Hershberger wrote: > > On Fri, Jun 1, 2012 at 3:39 PM, Michael Walle 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 > > > Cc: Joe Hershberger > > > --- > > > > Acked-by: Joe Hershberger > > 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 #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 -- Michael