From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] jsoncpp: fix build
Date: Thu, 26 Mar 2015 06:57:06 +0200 [thread overview]
Message-ID: <20150326045706.GE2825@tarshish> (raw)
In-Reply-To: <20150325004703.17cf63b2@free-electrons.com>
Hi Thomas,
On Wed, Mar 25, 2015 at 12:47:03AM +0100, Thomas Petazzoni wrote:
> On Tue, 24 Mar 2015 18:22:51 +0200, Baruch Siach wrote:
> > +snprintf() is not in the std namespace. This fixes the build error below:
> > +
> > +src/lib_json/json_writer.cpp:33:18: error: 'snprintf' is not a member of 'std'
>
> Well, in C++11, snprintf *is* in the std:: namespace. See
> http://en.cppreference.com/w/cpp/io/c/fprintf. However, if we can get
> along without using std::snprintf() and use the C library snprintf()
> instead as a work-around in Buildroot, then it's all great for me.
>
> But it would require a reworking of your patch, along the lines of:
>
> std::snprintf() is only available in C++11, which is not provided by
> all compilers. Since the C library snprintf() can easily be used as a
> replacement on Linux systems, this patch changes jsoncpp to use the C
> library snprintf() instead of C++11 std::snprintf().
Thanks for the hint. I'll send an updated pull request, and update this patch.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
prev parent reply other threads:[~2015-03-26 4:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 16:22 [Buildroot] [PATCH] jsoncpp: fix build Baruch Siach
2015-03-24 23:47 ` Thomas Petazzoni
2015-03-26 4:57 ` Baruch Siach [this message]
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=20150326045706.GE2825@tarshish \
--to=baruch@tkos.co.il \
--cc=buildroot@busybox.net \
/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