mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <r.hieber@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <r.hieber@pengutronix.de>
Subject: [ptxdist] [PATCH] host-tz-database: use snprintf provided by the host compiler
Date: Mon, 12 Feb 2018 11:40:23 +0100	[thread overview]
Message-ID: <20180212104023.20418-1-r.hieber@pengutronix.de> (raw)

On certain host libc's, this prevents errors like:

  make[1]: Entering directory '/home/itk/bsp/platform-cpu20/build-host/tz-database'
  cc -DTZDIR=\"/usr/share/zoneinfo\"    -c -o zdump.o zdump.c
  zdump.c:803:1: error: static declaration of 'snprintf' follows non-static declaration
     snprintf(char *s, size_t size, char const *format, ...)
     ^
  In file included from zdump.c:23:0:
  /usr/include/stdio.h:386:12: note: previous declaration of 'snprintf' was here
     extern int snprintf (char *__restrict __s, size_t __maxlen,
                ^
  <builtin>: recipe for target 'zdump.o' failed
  make[1]: *** [zdump.o] Error 1

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---
 rules/host-tz-database.make | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/host-tz-database.make b/rules/host-tz-database.make
index 264ced653..ce245feb5 100644
--- a/rules/host-tz-database.make
+++ b/rules/host-tz-database.make
@@ -66,8 +66,8 @@ $(STATEDIR)/host-tz-database.extract:
 HOST_TZ_DATABASE_PATH		:= PATH=$(HOST_PATH)
 HOST_TZ_DATABASE_CONF_TOOL	:= NO
 HOST_TZ_DATABASE_MAKE_OPT	:= \
-	zic TZDIR=/usr/share/zoneinfo CFLAGS=-DSTD_INSPIRED
+	zic TZDIR=/usr/share/zoneinfo CFLAGS="-DSTD_INSPIRED -DHAVE_SNPRINTF"
 HOST_TZ_DATABASE_INSTALL_OPT	:= \
-	posix_only TZDIR=/usr/share/zoneinfo
+	posix_only TZDIR=/usr/share/zoneinfo CFLAGS="-DHAVE_SNPRINTF"
 
 # vim: syntax=make
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

                 reply	other threads:[~2018-02-12 10:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180212104023.20418-1-r.hieber@pengutronix.de \
    --to=r.hieber@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox