From patchwork Thu Jun 28 06:01:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_Bie=C3=9Fmann?= X-Patchwork-Id: 167796 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 369C1B705D for ; Thu, 28 Jun 2012 16:02:19 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A9F8E28094; Thu, 28 Jun 2012 08:02:17 +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 Lw6CZqrAYzwm; Thu, 28 Jun 2012 08:02:17 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AF70D28088; Thu, 28 Jun 2012 08:02:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 011AF28088 for ; Thu, 28 Jun 2012 08:02:12 +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 wLHPYM9lUXeE for ; Thu, 28 Jun 2012 08:02:11 +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-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by theia.denx.de (Postfix) with ESMTPS id 20BC328082 for ; Thu, 28 Jun 2012 08:02:09 +0200 (CEST) Received: by bkty8 with SMTP id y8so1590735bkt.3 for ; Wed, 27 Jun 2012 23:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=kIExe3sntTH8nq4lqD56Zq3JGJcTH+BU9ZGyh9Q/eeM=; b=TcVR8Zgg6ZzbP54OR2/taoFbLFl31aL70HByXyFc6kpCoVxqwGIyQc5eDr7V2fp8vx eddgzM4BIBbfunmOyDuOtDWEc2WuqvOnSCP2fRkWivTS6u1A7dm1UiLXS8AQOFgpuwy6 mZMlEnvGjOKrhavqo0sHEEUU5tYwS+icg8FqU2jh8E0OoHgmHMEYNCHijbdEjJFUhX1h 4SCaeU0BPHV0fPPIQeio6F2eoNdVo5D9ZNoO/6wn6gXTfH74X3KX4reRHwnXhxxapcxN TpscNR/fn6W9r4m0KWYizdN9S71YfrZNskKbM5LzY9/pkkk7rSqyToQHh1EizjBJBWsV 8WOw== Received: by 10.205.118.1 with SMTP id fo1mr197624bkc.58.1340863329373; Wed, 27 Jun 2012 23:02:09 -0700 (PDT) Received: from andreas-mbp.erlangen.biessmann.tld (host-80-81-14-92.static.customer.m-online.net. [80.81.14.92]) by mx.google.com with ESMTPS id fw10sm57473126bkc.11.2012.06.27.23.02.08 (version=SSLv3 cipher=OTHER); Wed, 27 Jun 2012 23:02:08 -0700 (PDT) From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= To: U-Boot Mailinglist Date: Thu, 28 Jun 2012 08:01:58 +0200 Message-Id: <1340863319-63074-1-git-send-email-andreas.devel@googlemail.com> X-Mailer: git-send-email 1.7.11 MIME-Version: 1.0 Cc: Keith Mok Subject: [U-Boot] [PATCH] tools/mkenvimage.c: fix basename(3) usage 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 Use the POSIX variant of basename due to BSD systems (e.g. OS X) do not provide GNU version of basename(3). It is save to use the POSIX variant here cause we do never use argv[0] later on which may be modified by the basename(3) POSIX variant. On systems providing GNU variant the GNU variant should be used since string.h is included before libgen.h. Therefore let the _GNU_SOURCE as is. This patch fixes following warning (on OS X): ---8<--- mkenvimage.c: In function ‘main’: mkenvimage.c:105: warning: implicit declaration of function ‘basename’ mkenvimage.c:105: warning: assignment makes pointer from integer without a cast --->8--- Signed-off-by: Andreas Bießmann cc: Keith Mok --- This was sent by Keith Mok before. Read http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/126003 tools/mkenvimage.c | 1 + 1 Datei geändert, 1 Zeile hinzugefügt(+) diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c index bfc4eb6..5521268 100644 --- a/tools/mkenvimage.c +++ b/tools/mkenvimage.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include