From: Andreas Bießmann Date: Thu, 28 Jun 2012 06:01:58 +0000 (+0200) Subject: tools/mkenvimage.c: fix basename(3) usage X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=558cd995d6d3eaa94fb342d142289a1fa2f76ba3;p=project%2Fbcm63xx%2Fu-boot.git tools/mkenvimage.c: fix basename(3) usage 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 --- diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c index bfc4eb636b..55212687e1 100644 --- a/tools/mkenvimage.c +++ b/tools/mkenvimage.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include