aboutsummaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGravatar Baruch Siach <baruch@tkos.co.il>2015-03-31 08:05:55 +0300
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-03-31 13:55:52 +0200
commit42bb259af5ce66a8b74f6d00b9e4cfd81922e0e1 (patch)
tree3902a0349993fb0e2b7dde153ff499b9a17d56f2 /package
parent5ea04028e1b2939fe32740c4ce34fe11b91ef617 (diff)
downloadbuildroot-42bb259af5ce66a8b74f6d00b9e4cfd81922e0e1.tar.gz
buildroot-42bb259af5ce66a8b74f6d00b9e4cfd81922e0e1.tar.bz2
jsoncpp: fix build for non C++11 toolchains
Add a patch removing reference to std::snprintf that is only in C++11. Fixes: http://autobuild.buildroot.net/results/b39/b390beeb9a6fea12f1a4d9f2ff9a8a483628cad2/ http://autobuild.buildroot.net/results/d18/d18b3e116b680a3897fbea296938e900a1e5e80a/ http://autobuild.buildroot.net/results/1b2/1b20a2f81dd2b409785930705222bc03576c4907/ and many more. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package')
-rw-r--r--package/jsoncpp/0001-Revert-Use-std-namespace-for-snprintf.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/package/jsoncpp/0001-Revert-Use-std-namespace-for-snprintf.patch b/package/jsoncpp/0001-Revert-Use-std-namespace-for-snprintf.patch
new file mode 100644
index 0000000000..6c6ae2d0c4
--- /dev/null
+++ b/package/jsoncpp/0001-Revert-Use-std-namespace-for-snprintf.patch
@@ -0,0 +1,39 @@
+From 29bfb6ac06b7304d326e3b70fc0209a702b89d83 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Subject: [PATCH] Revert "Use std namespace for snprintf."
+
+This reverts commit 1c58876185d2a4ed87dac4a54b82f607e74f55fd.
+
+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(), fixing the build error
+below:
+
+src/lib_json/json_writer.cpp:33:18: error: 'snprintf' is not a member of 'std'
+
+Upstream status: sent upstream
+package/jsoncpp/0001-Revert-Use-std-namespace-for-snprintf.patch
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+
+ src/lib_json/json_writer.cpp | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
+index 83102fd2bb86..f7ad1e21bbc0 100644
+--- a/src/lib_json/json_writer.cpp
++++ b/src/lib_json/json_writer.cpp
+@@ -29,8 +29,6 @@
+
+ #if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
+ #define snprintf _snprintf
+-#else
+-#define snprintf std::snprintf
+ #endif
+
+ #if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0
+--
+2.1.4
+